Skip to main content

EventPayload

Enum EventPayload 

Source
pub enum EventPayload {
    EmbassyTaskReady {
        task_id: u16,
        executor_id: u3,
    },
    EmbassyTaskExecBegin {
        task_id: u16,
        executor_id: u3,
    },
    EmbassyTaskExecEnd {
        executor_id: u3,
    },
    EmbassyExecutorPollStart {
        executor_id: u3,
    },
    EmbassyExecutorIdle {
        executor_id: u3,
    },
    MonitorStart {
        monitor_id: u8,
    },
    MonitorEnd,
    MonitorValue {
        value_id: u8,
        value: MonitorValuePayload,
    },
    TypeDefinition(TypeDefinitionPayload),
    DataLossEvent {
        dropped_events: u32,
    },
    DefmtData {
        len: u8,
        data: *const u8,
    },
}

Variants§

§

EmbassyTaskReady

Embassy Task is ready to be polled (Waker called). ExecutorID will also be included

Fields

§task_id: u16
§executor_id: u3
§

EmbassyTaskExecBegin

Embassy Task execution began (poll called). ExecutorID will also be included

Fields

§task_id: u16
§executor_id: u3
§

EmbassyTaskExecEnd

Embassy Task execution ended (returned Poll::Ready or yielded Poll::Pending). ExecutorID is included because it is shorter to transmit than TaskID and we know the executor from the TaskExecBegin event.

Fields

§executor_id: u3
§

EmbassyExecutorPollStart

Embassy Executor started polling tasks. ExecutorID is included because it is the only identifier for the executor.

Fields

§executor_id: u3
§

EmbassyExecutorIdle

Embassy Executor is idle (no tasks to poll). ExecutorID is included because it is the only identifier for the executor.

Fields

§executor_id: u3
§

MonitorStart

Function or Scope Monitor started MonitorID identifies the monitor instance (was assigned via previous TypeDefinition event).

Fields

§monitor_id: u8
§

MonitorEnd

Function or Scope Monitor ended MonitorID are not included here because they can be inferred from the corresponding MonitorStart event

§

MonitorValue

Value Monitor reported a value ValueID identifies the monitor instance (was assigned via previous TypeDefinition event). Value is the reported value payload.

Fields

§value_id: u8
§

TypeDefinition(TypeDefinitionPayload)

Type Definition Event

§

DataLossEvent

Data Loss Event because of buffer full situation

Fields

§dropped_events: u32
§

DefmtData

Fields

§len: u8

Implementations§

Source§

impl EventPayload

Source

pub const fn event_id(&self) -> u5

Source

pub const fn get_executor_id(&self) -> Option<u3>

Returns the executor ID if the event is related to an embassy executor

Source

pub const fn get_monitor_value_type_id(&self) -> Option<u3>

Returns the MonitorValuePayload type ID if the event is a MonitorValue event

Source

pub const fn get_sub_id(&self) -> Option<u3>

Returns the sub ID (executor ID or MonitorValue type ID) if applicable

Source

pub fn write_bytes(&self, writer: &mut BufferWriter)

Source

pub fn from_bytes( event_type: u8, buffer: &mut BufferReader<'_>, ) -> Result<EventPayload, ReadTracingError>

Reads an EventPayload from the provided buffer based on the given type ID. Params:

  • event_type: The combined event type byte containing event ID and executor short ID.
  • buffer: The buffer reader to read additional event data from.

Trait Implementations§

Source§

impl Clone for EventPayload

Source§

fn clone(&self) -> EventPayload

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EventPayload

Source§

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

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

impl PartialEq for EventPayload

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EventPayload

Auto Trait Implementations§

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.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

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.