Struct rings_core::chunk::ChunkList
source · pub struct ChunkList<const MTU: usize>(/* private fields */);Expand description
List of Chunk, simply wrapped Vec<Chunk>
Implementations§
source§impl<const MTU: usize> ChunkList<MTU>
impl<const MTU: usize> ChunkList<MTU>
sourcepub fn as_vec_mut(&mut self) -> &mut Vec<Chunk>
pub fn as_vec_mut(&mut self) -> &mut Vec<Chunk>
ChunkList to &mut Vec
sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
check list that is completed
sourcepub fn try_withdraw(&self) -> Option<Bytes>
pub fn try_withdraw(&self) -> Option<Bytes>
if list is completed, withdraw data, or return None
Trait Implementations§
source§impl<const MTU: usize> ChunkManager for ChunkList<MTU>
impl<const MTU: usize> ChunkManager for ChunkList<MTU>
source§fn list_completed(&self) -> Vec<Uuid>
fn list_completed(&self) -> Vec<Uuid>
list completed Chunks;
source§fn list_pending(&self) -> Vec<Uuid>
fn list_pending(&self) -> Vec<Uuid>
list pending Chunks;
source§fn get(&self, id: Uuid) -> Option<Bytes>
fn get(&self, id: Uuid) -> Option<Bytes>
get sepc msg via uuid
if a msg is not completed, it will returns None
source§fn remove_expired(&mut self)
fn remove_expired(&mut self)
remove expired chunks by ttl
source§impl<'de, const MTU: usize> Deserialize<'de> for ChunkList<MTU>
impl<'de, const MTU: usize> Deserialize<'de> for ChunkList<MTU>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<const MTU: usize> IntoIterator for &ChunkList<MTU>
impl<const MTU: usize> IntoIterator for &ChunkList<MTU>
source§impl<const MTU: usize> IntoIterator for ChunkList<MTU>
impl<const MTU: usize> IntoIterator for ChunkList<MTU>
Auto Trait Implementations§
impl<const MTU: usize> Freeze for ChunkList<MTU>
impl<const MTU: usize> RefUnwindSafe for ChunkList<MTU>
impl<const MTU: usize> Send for ChunkList<MTU>
impl<const MTU: usize> Sync for ChunkList<MTU>
impl<const MTU: usize> Unpin for ChunkList<MTU>
impl<const MTU: usize> UnwindSafe for ChunkList<MTU>
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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