CliEvent

Enum CliEvent 

Source
pub enum CliEvent {
Show 20 variants Received { from: PublicKey, hops: u8, rssi: i16, snr: i16, prefix: Vec<u8, EVENT_PAYLOAD_MAX>, }, AckReceived { peer: PublicKey, }, AckTimeout { peer: PublicKey, }, NodeDiscovered { from: PublicKey, name: Option<String<32>>, }, Beacon { hint: NodeHint, from: Option<PublicKey>, }, PfsEstablished { peer: PublicKey, }, PfsEnded { peer: PublicKey, }, PfsFailed { peer: PublicKey, reason: PfsFailure, }, Pong { peer: PublicKey, rtt_ms: u64, }, PingTimeout { peer: PublicKey, }, UnknownMacCmdIn { peer: PublicKey, cmd_id: u8, }, RawTx { bytes: Vec<u8, EVENT_RAW_MAX>, }, RawRx { bytes: Vec<u8, EVENT_RAW_MAX>, }, OutputLine { line: String<EVENT_LINE_MAX>, }, SendText { peer: PublicKey, body: String<EVENT_LINE_MAX>, }, StartPfs { peer: PublicKey, minutes: u16, }, EndPfs { peer: PublicKey, }, ChannelSend { channel_slot: u8, body: String<EVENT_LINE_MAX>, }, SendBeacon, SendRaw { peer: PublicKey, bytes: Vec<u8, EVENT_PAYLOAD_MAX>, },
}

Variants§

§

Received

Fields

§from: PublicKey
§hops: u8
§rssi: i16
§snr: i16
§prefix: Vec<u8, EVENT_PAYLOAD_MAX>
§

AckReceived

Fields

§peer: PublicKey
§

AckTimeout

Fields

§peer: PublicKey
§

NodeDiscovered

Fields

§from: PublicKey
§name: Option<String<32>>
§

Beacon

Fields

§hint: NodeHint

3-byte source hint from the packet header — always present.

§from: Option<PublicKey>

Full source pubkey, when the beacon carried it (some senders only include the hint to save airtime).

§

PfsEstablished

Fields

§peer: PublicKey
§

PfsEnded

Fields

§peer: PublicKey
§

PfsFailed

Fields

§peer: PublicKey
§reason: PfsFailure
§

Pong

Fields

§peer: PublicKey
§rtt_ms: u64
§

PingTimeout

Fields

§peer: PublicKey
§

UnknownMacCmdIn

Fields

§peer: PublicKey
§cmd_id: u8
§

RawTx

Fields

§bytes: Vec<u8, EVENT_RAW_MAX>
§

RawRx

Fields

§bytes: Vec<u8, EVENT_RAW_MAX>
§

OutputLine

Fields

§line: String<EVENT_LINE_MAX>
§

SendText

Fields

§peer: PublicKey
§body: String<EVENT_LINE_MAX>
§

StartPfs

Fields

§peer: PublicKey
§minutes: u16
§

EndPfs

Fields

§peer: PublicKey
§

ChannelSend

Fields

§channel_slot: u8
§body: String<EVENT_LINE_MAX>
§

SendBeacon

§

SendRaw

Fields

§peer: PublicKey
§bytes: Vec<u8, EVENT_PAYLOAD_MAX>

Trait Implementations§

Source§

impl Debug for CliEvent

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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
§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.