pub struct PieceList { /* private fields */ }Expand description
A list of Piece, suitable for issuing vectored writes via io_uring.
Implementations§
Source§impl PieceList
impl PieceList
Sourcepub fn push_back(&mut self, chunk: impl Into<Piece>)
pub fn push_back(&mut self, chunk: impl Into<Piece>)
Add a single chunk to the back of the list
Sourcepub fn push_front(&mut self, chunk: impl Into<Piece>)
pub fn push_front(&mut self, chunk: impl Into<Piece>)
Add a single chunk to the front of the list
Sourcepub fn followed_by(self, chunk: impl Into<Piece>) -> Self
pub fn followed_by(self, chunk: impl Into<Piece>) -> Self
Add a single chunk to the back list and return self
Sourcepub fn preceded_by(self, chunk: impl Into<Piece>) -> Self
pub fn preceded_by(self, chunk: impl Into<Piece>) -> Self
Add a single chunk to the front of the list and return self
pub fn num_pieces(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn into_vec_deque(self) -> VecDeque<Piece>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PieceList
impl !RefUnwindSafe for PieceList
impl !Send for PieceList
impl !Sync for PieceList
impl Unpin for PieceList
impl !UnwindSafe for PieceList
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