pub enum BackendDevice {
RAM(RAMDisk),
SD(SDCard),
}Expand description
実行環境に応じて RAMDisk と SDCard を安全に切り替えるためのデバイスラッパー
Variants§
Trait Implementations§
Source§impl BlockDevice for BackendDevice
impl BlockDevice for BackendDevice
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
データの二重化(ミラーリング)が必要な外部記憶デバイスかどうか
Auto Trait Implementations§
impl Freeze for BackendDevice
impl RefUnwindSafe for BackendDevice
impl Send for BackendDevice
impl Sync for BackendDevice
impl Unpin for BackendDevice
impl UnsafeUnpin for BackendDevice
impl UnwindSafe for BackendDevice
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