Skip to main content

ObservedEvent

Trait ObservedEvent 

Source
pub trait ObservedEvent: Message + Default {
    type Payload;

    // Required methods
    fn frame(&self) -> Option<&StreamFrame>;
    fn has_payload(&self) -> bool;
    fn take_payload(&mut self) -> Option<Self::Payload>;
    fn is_removal(&self) -> bool;
}
Expand description

Typed payload access; the checkpoint/budget state machine is shared.

Required Associated Types§

Required Methods§

Source

fn frame(&self) -> Option<&StreamFrame>

Source

fn has_payload(&self) -> bool

Source

fn take_payload(&mut self) -> Option<Self::Payload>

Source

fn is_removal(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§