pub struct BloopCollection<Player> { /* private fields */ }Expand description
A collection of bloops with a maximum age threshold.
Automatically prunes bloops which are older than the specified maximum age.
Implementations§
Source§impl<Player> BloopCollection<Player>
impl<Player> BloopCollection<Player>
Sourcepub fn new(max_age: Duration) -> Self
pub fn new(max_age: Duration) -> Self
Creates an empty collection with the specified maximum age.
Sourcepub fn with_bloops(max_age: Duration, bloops: Vec<Arc<Bloop<Player>>>) -> Self
pub fn with_bloops(max_age: Duration, bloops: Vec<Arc<Bloop<Player>>>) -> Self
Creates a collection pre-populated with bloops, sorted by most recent.
Trait Implementations§
Source§impl<Player: Debug> Debug for BloopCollection<Player>
impl<Player: Debug> Debug for BloopCollection<Player>
Source§impl<'a, Player: 'a> IntoIterator for &'a BloopCollection<Player>
impl<'a, Player: 'a> IntoIterator for &'a BloopCollection<Player>
Auto Trait Implementations§
impl<Player> Freeze for BloopCollection<Player>
impl<Player> RefUnwindSafe for BloopCollection<Player>
impl<Player> Send for BloopCollection<Player>
impl<Player> Sync for BloopCollection<Player>
impl<Player> Unpin for BloopCollection<Player>
impl<Player> UnwindSafe for BloopCollection<Player>
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
Source§impl<T> Erasable for T
impl<T> Erasable for T
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