pub enum LeafEvent {
PeerAdvertised {
peer: String,
},
SessionEstablished {
peer: String,
},
SessionReset {
peer: String,
},
MessageReceived {
peer: String,
text: String,
},
CommitApplied {
peer: String,
epoch: u64,
},
Ignored {
reason: String,
},
}Expand description
Something that happened, for the firmware to act on.
Variants§
PeerAdvertised
A peer advertised itself. The device now knows what it may emit.
SessionEstablished
A session came up. The device can seal to this peer from here.
SessionReset
A peer discarded its session and the device followed.
MessageReceived
An application message arrived and decrypted.
peer is proven: it is the address the sealing group member’s own
signature key derives to. What it is not is permission. Any address in
radio range can complete a pairing, so firmware decides what a message
from this particular peer is allowed to actuate. A lock that opens for
whatever arrives on an established session opens for anyone patient
enough to pair with it.
CommitApplied
A commit arrived and was applied. Post-compromise security advances here, on the cadence the peer sets, because this device never commits.
Ignored
A frame was not for this device, or carried nothing to act on.
Surfaced rather than swallowed so a bench can tell “refused” from “silently dropped”, which are the two states a pairing failure looks like from the outside.
Trait Implementations§
impl Eq for LeafEvent
impl StructuralPartialEq for LeafEvent
Auto Trait Implementations§
impl Freeze for LeafEvent
impl RefUnwindSafe for LeafEvent
impl Send for LeafEvent
impl Sync for LeafEvent
impl Unpin for LeafEvent
impl UnsafeUnpin for LeafEvent
impl UnwindSafe for LeafEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more