Struct PayloadToken
pub struct PayloadToken { /* private fields */ }Expand description
A registered payload direction with its value type erased: what the object-safe send services take. The game issues one when registration freezes; it names the declaration’s slot, its phases, its direction and the load session that issued it.
Implementations§
§impl PayloadToken
impl PayloadToken
pub const fn phase(self) -> PayloadPhase
pub const fn phase(self) -> PayloadPhase
The phases the payload is declared for.
pub const fn direction(self) -> PayloadDirection
pub const fn direction(self) -> PayloadDirection
The way the payload travels.
pub fn admit(
self,
direction: PayloadDirection,
load_session: u64,
phase: ConnectionPhase,
declarations: &[PayloadToken],
) -> Result<u32, PayloadSendError>
pub fn admit( self, direction: PayloadDirection, load_session: u64, phase: ConnectionPhase, declarations: &[PayloadToken], ) -> Result<u32, PayloadSendError>
The declaration’s slot, when this token may send direction-ward on
a connection in phase of the load session load_session. A send
service supplies its engine-owned frozen declaration table, indexed by slot,
and checks exact token metadata before anything else. A forged or stale token
reaches no codec and no handler.
Trait Implementations§
§impl Clone for PayloadToken
impl Clone for PayloadToken
§fn clone(&self) -> PayloadToken
fn clone(&self) -> PayloadToken
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PayloadToken
§impl Debug for PayloadToken
impl Debug for PayloadToken
impl Eq for PayloadToken
§impl Hash for PayloadToken
impl Hash for PayloadToken
§impl PartialEq for PayloadToken
impl PartialEq for PayloadToken
impl StructuralPartialEq for PayloadToken
Auto Trait Implementations§
impl Freeze for PayloadToken
impl RefUnwindSafe for PayloadToken
impl Send for PayloadToken
impl Sync for PayloadToken
impl Unpin for PayloadToken
impl UnsafeUnpin for PayloadToken
impl UnwindSafe for PayloadToken
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