Skip to main content

BleLink

Trait BleLink 

Source
pub trait BleLink {
    type Error: Debug;
    type Source: BleSource<Error = Self::Error>;
    type Sink: BleSink<Error = Self::Error>;

    // Required methods
    fn peer_protocol(&self) -> PeerProtocol;
    fn address(&self) -> BleAddress;
    async fn control_send(&mut self, msg: &Control) -> Result<(), Self::Error>;
    async fn control_recv(&mut self) -> Result<Control, Self::Error>;
    async fn upgrade(&mut self, plan: &L2capPlan) -> Result<(), Self::Error>;
    fn into_data(self) -> (Self::Source, Self::Sink);

    // Provided methods
    async fn receive_columba_peer_identity(
        &mut self,
    ) -> Result<BleIdentity, Self::Error> { ... }
    async fn send_columba_identity(
        &mut self,
        _identity: BleIdentity,
    ) -> Result<(), Self::Error> { ... }
}

Required Associated Types§

Source

type Error: Debug

Source

type Source: BleSource<Error = Self::Error>

Source

type Sink: BleSink<Error = Self::Error>

Required Methods§

Source

fn peer_protocol(&self) -> PeerProtocol

Source

fn address(&self) -> BleAddress

Source

async fn control_send(&mut self, msg: &Control) -> Result<(), Self::Error>

Source

async fn control_recv(&mut self) -> Result<Control, Self::Error>

Source

async fn upgrade(&mut self, plan: &L2capPlan) -> Result<(), Self::Error>

Source

fn into_data(self) -> (Self::Source, Self::Sink)

Provided Methods§

Source

async fn receive_columba_peer_identity( &mut self, ) -> Result<BleIdentity, Self::Error>

Source

async fn send_columba_identity( &mut self, _identity: BleIdentity, ) -> Result<(), Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§