Skip to main content

DirectiveEgress

Trait DirectiveEgress 

Source
pub trait DirectiveEgress {
    // Required methods
    fn send(&mut self, target: InterfaceId, bytes: &[u8]);
    fn send_announce(
        &mut self,
        target: InterfaceId,
        announce: AnnounceDirective<'_>,
    );
    fn send_to_fleet(
        &mut self,
        supervisor: InterfaceKind,
        fan: FanTarget,
        bytes: &[u8],
    );
    fn send_announce_to_fleet(
        &mut self,
        supervisor: InterfaceKind,
        fan: FanTarget,
        announce: AnnounceDirective<'_>,
    );
    fn emit_frame(
        &mut self,
        target: InterfaceId,
        size_hint: usize,
        fill: &mut dyn FnMut(&mut [u8]) -> Option<usize>,
    );

    // Provided methods
    fn send_if_online(
        &mut self,
        target: InterfaceId,
        bytes: &[u8],
        on_send: &mut dyn FnMut(),
    ) { ... }
    fn send_measured_local_announce(
        &mut self,
        target: InterfaceId,
        bytes: &[u8],
    ) { ... }
    fn send_measured_local_announce_to_fleet(
        &mut self,
        supervisor: InterfaceKind,
        fan: FanTarget,
        bytes: &[u8],
    ) { ... }
}

Required Methods§

Source

fn send(&mut self, target: InterfaceId, bytes: &[u8])

Source

fn send_announce( &mut self, target: InterfaceId, announce: AnnounceDirective<'_>, )

Source

fn send_to_fleet( &mut self, supervisor: InterfaceKind, fan: FanTarget, bytes: &[u8], )

Source

fn send_announce_to_fleet( &mut self, supervisor: InterfaceKind, fan: FanTarget, announce: AnnounceDirective<'_>, )

Source

fn emit_frame( &mut self, target: InterfaceId, size_hint: usize, fill: &mut dyn FnMut(&mut [u8]) -> Option<usize>, )

Provided Methods§

Source

fn send_if_online( &mut self, target: InterfaceId, bytes: &[u8], on_send: &mut dyn FnMut(), )

Source

fn send_measured_local_announce(&mut self, target: InterfaceId, bytes: &[u8])

Source

fn send_measured_local_announce_to_fleet( &mut self, supervisor: InterfaceKind, fan: FanTarget, bytes: &[u8], )

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§