Struct asuran::repository::backend::common::segment::SegmentDataPart [−][src]
pub struct SegmentDataPart<T> { /* fields omitted */ }
Expand description
A view over the data portion of a segment.
Implementations
Will attempt to open the given handle as a SegmentDataPart
Errors
- Will propagate any IO errors
- Will return
Err(BackendError::SegmentError)
if the segment has a header and it fails validation
If the segment has non-zero length, will do nothing and return Ok(false).
Otherwise, will write the header to the segment file.
Errors
Will return Err
if any underlying I/O errors occur
Will attempt to read the header from the segment
Errors
- Will return
Err(BackendError::Unknown)
if deserializing the header fails - Will propagate any I/O errors that occur
Returns the number of free bytes remaining in this segment
Auto Trait Implementations
impl<T> RefUnwindSafe for SegmentDataPart<T> where
T: RefUnwindSafe,
impl<T> Send for SegmentDataPart<T> where
T: Send,
impl<T> Sync for SegmentDataPart<T> where
T: Sync,
impl<T> Unpin for SegmentDataPart<T> where
T: Unpin,
impl<T> UnwindSafe for SegmentDataPart<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