pub struct FlatIdPool { /* private fields */ }Expand description
Pool of ids for the clients.
Implementations§
Source§impl FlatIdPool
impl FlatIdPool
Sourcepub fn push_back_unchecked(&mut self, id: u16)
pub fn push_back_unchecked(&mut self, id: u16)
Push id to the pool. Prefixed with _unchecked
because it will not check id presence in the pool.
Sourcepub fn request(&mut self) -> Result<u16, IdRequestError>
pub fn request(&mut self) -> Result<u16, IdRequestError>
Requests id from the pool.
Trait Implementations§
Source§impl Clone for FlatIdPool
impl Clone for FlatIdPool
Source§fn clone(&self) -> FlatIdPool
fn clone(&self) -> FlatIdPool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FlatIdPool
impl RefUnwindSafe for FlatIdPool
impl Send for FlatIdPool
impl Sync for FlatIdPool
impl Unpin for FlatIdPool
impl UnwindSafe for FlatIdPool
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