Struct asuran::repository::backend::common::segment::SegmentHeaderPart [−][src]
Expand description
A view over the header portion of a segment
Will cache the state of the header internally and flush the changes either when
the flush
method is called, or on drop.
It is strongly recommended to call the flush
method before dropping this type.
The Drop
impl will attempt to call flush
, but will ignore any errors that
occur.
Implementations
Attempts to open the header part of a Segment
.
Errors:
Will error if decryption fails, the header file has a malformed chunk, or if some other IO error occurs.
Flushes the in-memory buffer to disk.
Will not do anything if no changes have been added.
Will additionally reset the changed flag.
Errors:
Will error if an I/O error occurs during writing.
Will return the chunk header information at the given index, if one exists
Will insert the chunk header information and provide its index
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for SegmentHeaderPart<T> where
T: RefUnwindSafe,
impl<T> Send for SegmentHeaderPart<T> where
T: Send,
impl<T> Sync for SegmentHeaderPart<T> where
T: Sync,
impl<T> Unpin for SegmentHeaderPart<T> where
T: Unpin,
impl<T> UnwindSafe for SegmentHeaderPart<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more