Skip to main content

Event

Enum Event 

Source
pub enum Event {
Show 22 variants Ready(ControllerInfo), InclusionStarted, InclusionStopped, ExclusionStarted, ExclusionStopped, NodeAdded { node: NodeId, }, NodeRemoved { node: NodeId, }, GrantSecurityClasses { node: NodeId, requested: Vec<SecurityClass>, }, ValidateDsk { node: NodeId, dsk: String, }, SecurityBootstrapped { node: NodeId, classes: Vec<SecurityClass>, }, SecurityFailed { node: NodeId, reason: String, }, InterviewStage { node: NodeId, stage: InterviewStage, }, InterviewCompleted { node: NodeId, }, InterviewFailed { node: NodeId, reason: String, }, NodeUpdated { node: NodeId, }, NodeStatus { node: NodeId, status: NodeStatus, }, Value(ValueUpdate), Route { node: NodeId, repeaters: Vec<NodeId>, rssi: Option<i8>, }, Command { node: NodeId, endpoint: u8, command: Command, }, FirmwareUpdateProgress { node: NodeId, sent: u16, total: u16, }, FirmwareUpdateFinished { node: NodeId, status: u8, success: bool, }, ProvisioningChanged { entries: Vec<Entry>, },
}
Expand description

Something that happened on the network.

Variants§

§

Ready(ControllerInfo)

The controller is initialized.

§

InclusionStarted

Inclusion mode is on; press the node’s button.

§

InclusionStopped

Inclusion mode is off.

§

ExclusionStarted

Exclusion mode is on.

§

ExclusionStopped

Exclusion mode is off.

§

NodeAdded

A node joined (protocol part done; security and interview follow).

Fields

§node: NodeId

The node.

§

NodeRemoved

A node left or was removed.

Fields

§node: NodeId

The node.

§

GrantSecurityClasses

S2: the node asks for these keys; answer with Controller::grant_security_classes.

Fields

§node: NodeId

The joining node.

§requested: Vec<SecurityClass>

Requested classes, highest first.

§

ValidateDsk

S2: confirm the PIN (first five digits of the DSK) with Controller::validate_dsk.

Fields

§node: NodeId

The joining node.

§dsk: String

The DSK with the PIN masked, xxxxx-12345-....

§

SecurityBootstrapped

The key exchange finished; these classes are granted.

Fields

§node: NodeId

The node.

§classes: Vec<SecurityClass>

Granted classes, highest first (empty: included without security).

§

SecurityFailed

The key exchange failed; the node is included without security.

Fields

§node: NodeId

The node.

§reason: String

Why.

§

InterviewStage

The interview reached a new stage.

Fields

§node: NodeId

The node.

§stage: InterviewStage

The stage just reached.

§

InterviewCompleted

The interview finished.

Fields

§node: NodeId

The node.

§

InterviewFailed

The interview failed for now; it is retried.

Fields

§node: NodeId

The node.

§reason: String

Why.

§

NodeUpdated

A node’s record changed (new metadata); re-read it with Controller::node.

Fields

§node: NodeId

The node.

§

NodeStatus

Awake, asleep, alive or dead.

Fields

§node: NodeId

The node.

§status: NodeStatus

The new status.

§

Value(ValueUpdate)

A value reported by a node.

§

Route

A transmission reached the node along this route.

Fields

§node: NodeId

The node.

§repeaters: Vec<NodeId>

Repeaters from the controller outwards (empty: direct).

§rssi: Option<i8>

RSSI of the node’s ACK at the controller.

§

Command

A command a node sent that the stack did not turn into a value.

Fields

§node: NodeId

The node.

§endpoint: u8

The endpoint (0 is the root device).

§command: Command

The command.

§

FirmwareUpdateProgress

Fragments sent so far in a firmware update.

Fields

§node: NodeId

The node.

§sent: u16

Fragments sent.

§total: u16

Fragments in the image.

§

FirmwareUpdateFinished

A firmware update ended.

Fields

§node: NodeId

The node.

§status: u8

The node’s status byte.

§success: bool

Whether the node accepted the image.

§

ProvisioningChanged

The provisioning list changed.

Fields

§entries: Vec<Entry>

The entries.

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Event

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Event

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnsafeUnpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more