pub struct FileInner {
pub file: Option<File>,
pub val: usize,
}
Expand description
Implementation helper for File
This is the struct which the methods of the Diskit
trait receive when they need a file.
file
wraps an fs::File
so that
StdDiskit
is more efficient, so it shouldn’t
be used by any other diskit.
In val
you can store one usize
worth of data.
If this is not sufficient you have to store the excess data in
your type that implements Diskit
and make this
an index in your struct.
While all this struct’s fields are (necessarily) pub
they should
not be changed by anyone or anything apart from the original
diskit that created it.
Fields§
§file: Option<File>
§val: usize
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for FileInner
impl Send for FileInner
impl Sync for FileInner
impl Unpin for FileInner
impl UnwindSafe for FileInner
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