pub struct SeqMut<'w>(/* private fields */);Expand description
Mutable access to the world’s current sequence number.
Allows handlers to advance the sequence — useful for stamping outbound messages with monotonic sequence numbers.
§Example
ⓘ
use nexus_rt::{SeqMut, Handler, IntoHandler};
fn send_message(mut seq: SeqMut<'_>, event: u64) {
let msg_seq = seq.advance();
// stamp msg_seq on outbound message
}Implementations§
Trait Implementations§
Source§impl Param for SeqMut<'_>
impl Param for SeqMut<'_>
Source§fn init(_registry: &Registry)
fn init(_registry: &Registry)
Resolve state from the registry. Called once at build time. Read more
Source§unsafe fn fetch<'w>(world: &'w World, _state: &'w mut ()) -> SeqMut<'w>
unsafe fn fetch<'w>(world: &'w World, _state: &'w mut ()) -> SeqMut<'w>
Fetch the item using cached state. Read more
Source§fn resource_id(state: &Self::State) -> Option<ResourceId>
fn resource_id(state: &Self::State) -> Option<ResourceId>
The ResourceId this param accesses, if any. Read more
Auto Trait Implementations§
impl<'w> Freeze for SeqMut<'w>
impl<'w> !RefUnwindSafe for SeqMut<'w>
impl<'w> !Send for SeqMut<'w>
impl<'w> !Sync for SeqMut<'w>
impl<'w> Unpin for SeqMut<'w>
impl<'w> UnsafeUnpin for SeqMut<'w>
impl<'w> !UnwindSafe for SeqMut<'w>
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