pub struct SaveFile<A: Algebra> {
pub kind: SaveKind,
pub algebra: Arc<A>,
pub b: Bidegree,
pub idx: Option<usize>,
}Fields§
§kind: SaveKind§algebra: Arc<A>§b: Bidegree§idx: Option<usize>Implementations§
Source§impl<A: Algebra> SaveFile<A>
impl<A: Algebra> SaveFile<A>
fn write_header(&self, buffer: &mut impl Write) -> Result<()>
fn validate_header(&self, buffer: &mut impl Read) -> Result<()>
Sourcefn get_save_path(&self, dir: PathBuf) -> PathBuf
fn get_save_path(&self, dir: PathBuf) -> PathBuf
This panics if there is no save dir
pub fn open_file(&self, dir: PathBuf) -> Option<Box<dyn Read>>
pub fn exists(&self, dir: PathBuf) -> bool
pub fn delete_file(&self, dir: PathBuf) -> Result<()>
Auto Trait Implementations§
impl<A> Freeze for SaveFile<A>
impl<A> RefUnwindSafe for SaveFile<A>where
A: RefUnwindSafe,
impl<A> Send for SaveFile<A>
impl<A> Sync for SaveFile<A>
impl<A> Unpin for SaveFile<A>
impl<A> UnwindSafe for SaveFile<A>where
A: RefUnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more