File_system

Struct Memory_device_type

Source
pub struct Memory_device_type<const Block_size: usize>(/* private fields */);

Implementations§

Source§

impl<const Block_size: usize> Memory_device_type<Block_size>

Source

pub fn New(Size: usize) -> Self

Source

pub fn From_vec(Data: Vec<u8>) -> Self

Source

pub fn Get_block_count(&self) -> usize

Trait Implementations§

Source§

impl<const Block_size: usize> Device_trait for Memory_device_type<Block_size>

Source§

fn Read(&self, Buffer: &mut [u8]) -> Result_type<Size_type>

Read data from the device.
Source§

fn Write(&self, Buffer: &[u8]) -> Result_type<Size_type>

Write data to the device.
Source§

fn Get_size(&self) -> Result_type<Size_type>

Get the size of maximum data that can be read or written.
Source§

fn Set_position(&self, Position: &Position_type) -> Result_type<Size_type>

Set the position of the device.
Source§

fn Erase(&self) -> Result_type<()>

Erase the device. Read more
Source§

fn Flush(&self) -> Result_type<()>

Flush the device (write any buffered data).
Source§

fn Get_block_size(&self) -> Result_type<usize>

Get the device block size.
Source§

fn Dump_device(&self) -> Result_type<Vec<u8>>

Source§

fn Read_line(&self, Buffer: &mut String) -> Result_type<Size_type>

Source§

fn Is_a_terminal(&self) -> bool

Source§

fn Is_a_block_device(&self) -> bool

Auto Trait Implementations§

§

impl<const Block_size: usize> !Freeze for Memory_device_type<Block_size>

§

impl<const Block_size: usize> RefUnwindSafe for Memory_device_type<Block_size>

§

impl<const Block_size: usize> Send for Memory_device_type<Block_size>

§

impl<const Block_size: usize> Sync for Memory_device_type<Block_size>

§

impl<const Block_size: usize> Unpin for Memory_device_type<Block_size>

§

impl<const Block_size: usize> UnwindSafe for Memory_device_type<Block_size>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.