pub enum FileContent<'a, const BLOCK_SIZE: usize = 512> {
    Read(&'a [u8]),
    Write(&'a mut [u8]),
    Dynamic(&'a mut dyn DynamicFile<BLOCK_SIZE>),
}
Expand description

Files may contain a read buffer, write buffer, or read/write trait

Variants

Read(&'a [u8])

Read only buffer

Write(&'a mut [u8])

Read/write buffer

Dynamic(&'a mut dyn DynamicFile<BLOCK_SIZE>)

Read/write object

Trait Implementations

Create a file from an immutable array

Converts to this type from the input type.

Create a file from an immutable buffer

Converts to this type from the input type.

Create a file from a mutable array

Converts to this type from the input type.

Create a file from a mutable buffer

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.