Trait usb_pd::sink::Driver

source ·
pub trait Driver {
    // Required methods
    fn init(&mut self) -> impl Future<Output = ()>;
    fn poll(&mut self, now: Instant) -> impl Future<Output = ()>;
    fn get_pending_message(&mut self) -> Option<Message>;
    fn did_change_protocol(&mut self) -> bool;
    fn send_message(
        &mut self,
        header: Header,
        payload: &[u8]
    ) -> impl Future<Output = ()>;
    fn state(&mut self) -> DriverState;
}

Required Methods§

source

fn init(&mut self) -> impl Future<Output = ()>

source

fn poll(&mut self, now: Instant) -> impl Future<Output = ()>

source

fn get_pending_message(&mut self) -> Option<Message>

source

fn did_change_protocol(&mut self) -> bool

source

fn send_message( &mut self, header: Header, payload: &[u8] ) -> impl Future<Output = ()>

source

fn state(&mut self) -> DriverState

Object Safety§

This trait is not object safe.

Implementors§