pub struct RAMDisk {
base_ptr: *mut u8,
size_bytes: usize,
sectors: usize,
_allocated: Option<Vec<u8>>,
}Expand description
メモリ上にファイルシステム全体を格納する仮想RAMディスク
Fields§
§base_ptr: *mut u8§size_bytes: usize§sectors: usize§_allocated: Option<Vec<u8>>Implementations§
Trait Implementations§
Source§impl BlockDevice for RAMDisk
impl BlockDevice for RAMDisk
Source§fn total_sectors(&self) -> usize
fn total_sectors(&self) -> usize
デバイスの総セクタ数を取得します
Source§fn read_raw_sector(
&mut self,
sector: usize,
buf: &mut [u8],
) -> Result<(), &'static str>
fn read_raw_sector( &mut self, sector: usize, buf: &mut [u8], ) -> Result<(), &'static str>
生セクタ (512バイト) の読み込みを行います (チェックサム検証なし)
Source§fn write_raw_sector(
&mut self,
sector: usize,
buf: &[u8],
) -> Result<(), &'static str>
fn write_raw_sector( &mut self, sector: usize, buf: &[u8], ) -> Result<(), &'static str>
生セクタ (512バイト) の書き込みを行います (チェックサム検証なし)
Source§fn should_mirror(&self) -> bool
fn should_mirror(&self) -> bool
データの二重化(ミラーリング)が必要な外部記憶デバイスかどうか
impl Send for RAMDisk
impl Sync for RAMDisk
Auto Trait Implementations§
impl Freeze for RAMDisk
impl RefUnwindSafe for RAMDisk
impl Unpin for RAMDisk
impl UnsafeUnpin for RAMDisk
impl UnwindSafe for RAMDisk
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more