component_events::events

Trait Event

Source
pub trait Event: TryFrom<Event, Error = Error> {
    const TYPE: EventType;
    const NAME: &'static str;

    // Required methods
    fn target_moniker(&self) -> &str;
    fn component_url(&self) -> &str;
    fn timestamp(&self) -> BootInstant;
    fn is_ok(&self) -> bool;
    fn is_err(&self) -> bool;
}
Expand description

Common features of any event - event type, target moniker, conversion function

Required Associated Constants§

Source

const TYPE: EventType

Source

const NAME: &'static str

Required Methods§

Source

fn target_moniker(&self) -> &str

Source

fn component_url(&self) -> &str

Source

fn timestamp(&self) -> BootInstant

Source

fn is_ok(&self) -> bool

Source

fn is_err(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Event for CapabilityRequested

Source§

const TYPE: EventType = fcomponent::EventType::CapabilityRequested

Source§

const NAME: &'static str = "capability_requested"

Source§

impl Event for DebugStarted

Source§

const TYPE: EventType = fcomponent::EventType::DebugStarted

Source§

const NAME: &'static str = "debug_started"

Source§

impl Event for Destroyed

Source§

const TYPE: EventType = fcomponent::EventType::Destroyed

Source§

const NAME: &'static str = "destroyed"

Source§

impl Event for Resolved

Source§

const TYPE: EventType = fcomponent::EventType::Resolved

Source§

const NAME: &'static str = "resolved"

Source§

impl Event for Started

Source§

const TYPE: EventType = fcomponent::EventType::Started

Source§

const NAME: &'static str = "started"

Source§

impl Event for Stopped

Source§

const TYPE: EventType = fcomponent::EventType::Stopped

Source§

const NAME: &'static str = "stopped"

Source§

impl Event for Unresolved

Source§

const TYPE: EventType = fcomponent::EventType::Unresolved

Source§

const NAME: &'static str = "unresolved"