pub struct LocalEventAuthority { /* private fields */ }Expand description
Default event authority for local/CLI execution.
Creates envelopes using a SequenceCounter that starts at 0 (or a
caller-supplied offset). This reproduces the existing behaviour — it is
simply extracted behind the EventAuthority trait so the server can
substitute its own implementation.
Implementations§
Source§impl LocalEventAuthority
impl LocalEventAuthority
Sourcepub fn new() -> LocalEventAuthority
pub fn new() -> LocalEventAuthority
Create an authority that starts sequencing at 0.
Sourcepub fn with_offset(start: u64) -> LocalEventAuthority
pub fn with_offset(start: u64) -> LocalEventAuthority
Create an authority that starts sequencing at the given offset.
Used by server mode to resume sequencing where the previous turn left off.
Trait Implementations§
Source§impl Default for LocalEventAuthority
impl Default for LocalEventAuthority
Source§fn default() -> LocalEventAuthority
fn default() -> LocalEventAuthority
Returns the “default value” for a type. Read more
Source§impl EventAuthority for LocalEventAuthority
impl EventAuthority for LocalEventAuthority
Source§fn wrap(&self, event: AgentEvent) -> AgentEventEnvelope
fn wrap(&self, event: AgentEvent) -> AgentEventEnvelope
Wrap a raw event into an authoritative envelope.
Auto Trait Implementations§
impl Freeze for LocalEventAuthority
impl RefUnwindSafe for LocalEventAuthority
impl Send for LocalEventAuthority
impl Sync for LocalEventAuthority
impl Unpin for LocalEventAuthority
impl UnsafeUnpin for LocalEventAuthority
impl UnwindSafe for LocalEventAuthority
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