pub struct LifecycleId(/* private fields */);Expand description
An identifier that can be set on sent messages, and picked by the sending client. If set,
lifecycle events will be generated, and eventually SocketEvent::OnLifecycleEnd will be
generated to indicate that the lifecycle isn’t tracked any longer. The value zero (0) is not a
valid lifecycle identifier, and will be interpreted as not having it set.
Implementations§
Source§impl LifecycleId
impl LifecycleId
Sourcepub fn new(n: u64) -> Option<LifecycleId>
pub fn new(n: u64) -> Option<LifecycleId>
Creates a new LifecycleId.
Returns None if the value is zero, as zero is not a valid lifecycle identifier.
Sourcepub fn from(n: u64) -> LifecycleId
pub fn from(n: u64) -> LifecycleId
Trait Implementations§
Source§impl Clone for LifecycleId
impl Clone for LifecycleId
Source§fn clone(&self) -> LifecycleId
fn clone(&self) -> LifecycleId
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 moreSource§impl Debug for LifecycleId
impl Debug for LifecycleId
Source§impl Display for LifecycleId
impl Display for LifecycleId
Source§impl PartialEq for LifecycleId
impl PartialEq for LifecycleId
impl Eq for LifecycleId
Auto Trait Implementations§
impl Freeze for LifecycleId
impl RefUnwindSafe for LifecycleId
impl Send for LifecycleId
impl Sync for LifecycleId
impl Unpin for LifecycleId
impl UnwindSafe for LifecycleId
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