pub struct LostSegmentsList { /* private fields */ }Available on crate feature
alloc only.Expand description
Implementation based on a alloc::vec::Vec which can grow dynamically.
Optionally, a maximum capacity can be specified at creation time. This container allocates at run-time!
Implementations§
Trait Implementations§
Source§impl Debug for LostSegmentsList
impl Debug for LostSegmentsList
Source§impl Default for LostSegmentsList
impl Default for LostSegmentsList
Source§fn default() -> LostSegmentsList
fn default() -> LostSegmentsList
Returns the “default value” for a type. Read more
Source§impl LostSegmentStore for LostSegmentsList
impl LostSegmentStore for LostSegmentsList
type Iter<'a> = Cloned<Iter<'a, (u64, u64)>> where Self: 'a
Source§fn number_of_segments(&self) -> usize
fn number_of_segments(&self) -> usize
Current number of lost segments stored.
Source§fn supports_large_file_size(&self) -> bool
fn supports_large_file_size(&self) -> bool
Implementations may explicitely omit support for large file segments to save memory if
large file sizes are not used.
fn capacity(&self) -> Option<usize>
fn reset(&mut self)
Source§fn segment_in_store(&self, segment: (u64, u64)) -> bool
fn segment_in_store(&self, segment: (u64, u64)) -> bool
Checks whether a segment is already in the store. Read more
Source§fn add_lost_segment(
&mut self,
lost_seg: (u64, u64),
) -> Result<(), LostSegmentError>
fn add_lost_segment( &mut self, lost_seg: (u64, u64), ) -> Result<(), LostSegmentError>
Add a new lost segment. Read more
Source§fn coalesce_lost_segments(&mut self) -> Result<(), LostSegmentError>
fn coalesce_lost_segments(&mut self) -> Result<(), LostSegmentError>
The lost segment store may additionally have the capability to coalesce overlapping or
adjacent segments.
Source§fn remove_lost_segment(
&mut self,
segment_to_remove: (u64, u64),
) -> Result<bool, LostSegmentError>
fn remove_lost_segment( &mut self, segment_to_remove: (u64, u64), ) -> Result<bool, LostSegmentError>
Remove a lost segment. Read more
fn is_empty(&self) -> bool
Source§fn write_segments_to_bytes(
&self,
buf: &mut [u8],
file_flag: LargeFileFlag,
) -> Result<usize, LostSegmentWriteError>
fn write_segments_to_bytes( &self, buf: &mut [u8], file_flag: LargeFileFlag, ) -> Result<usize, LostSegmentWriteError>
Write the segments to the raw byte format of the NAK PDU segment requests as specified by
the CFDP standard 5.2.6.1 (NAK PDU).
Source§fn write_to_nak_segment_list(
&self,
nak_builder: &mut NakPduCreatorWithReservedSeqReqsBuf<'_>,
first_segment_request_for_metadata: bool,
) -> Result<usize, LostSegmentWriteError>
fn write_to_nak_segment_list( &self, nak_builder: &mut NakPduCreatorWithReservedSeqReqsBuf<'_>, first_segment_request_for_metadata: bool, ) -> Result<usize, LostSegmentWriteError>
Write the segments to the raw byte buffer of the supplied
NAK builder. Read more
Auto Trait Implementations§
impl Freeze for LostSegmentsList
impl RefUnwindSafe for LostSegmentsList
impl Send for LostSegmentsList
impl Sync for LostSegmentsList
impl Unpin for LostSegmentsList
impl UnwindSafe for LostSegmentsList
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