Skip to main content

ResetLocalServerHandler

Trait ResetLocalServerHandler 

Source
pub trait ResetLocalServerHandler<___T = Channel>
where ___T: Transport,
{ // Required methods fn assert( &mut self, responder: Responder<Assert, ___T>, ) -> impl Future<Output = ()>; fn deassert( &mut self, responder: Responder<Deassert, ___T>, ) -> impl Future<Output = ()>; fn toggle( &mut self, responder: Responder<Toggle, ___T>, ) -> impl Future<Output = ()>; fn toggle_with_timeout( &mut self, request: Request<ToggleWithTimeout, ___T>, responder: Responder<ToggleWithTimeout, ___T>, ) -> impl Future<Output = ()>; fn status( &mut self, responder: Responder<Status, ___T>, ) -> impl Future<Output = ()>; // Provided method fn on_unknown_interaction( &mut self, ordinal: u64, ) -> impl Future<Output = ()> { ... } }
Expand description

A server handler for the Reset protocol.

See Reset for more details.

Required Methods§

Source

fn assert( &mut self, responder: Responder<Assert, ___T>, ) -> impl Future<Output = ()>

Asserts the reset pin and leaves it asserted until Deassert is called.

Source

fn deassert( &mut self, responder: Responder<Deassert, ___T>, ) -> impl Future<Output = ()>

Deasserts the reset pin.

Source

fn toggle( &mut self, responder: Responder<Toggle, ___T>, ) -> impl Future<Output = ()>

These methods assert the pin, wait a predetermined amount of time, and then deassert the pin. The difference between Toggle and ToggleWithTimeout is that Toggle defers to the Reset driver to choose the timeout duration and ToggleWithTimeout allows the client to specify the timeout.

Source

fn toggle_with_timeout( &mut self, request: Request<ToggleWithTimeout, ___T>, responder: Responder<ToggleWithTimeout, ___T>, ) -> impl Future<Output = ()>

Source

fn status( &mut self, responder: Responder<Status, ___T>, ) -> impl Future<Output = ()>

Provided Methods§

Source

fn on_unknown_interaction(&mut self, ordinal: u64) -> impl Future<Output = ()>

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.

Implementations on Foreign Types§

Source§

impl<___H, ___T> ResetLocalServerHandler<___T> for Local<___H>
where ___H: ResetServerHandler<___T>, ___T: Transport,

Source§

async fn assert(&mut self, responder: Responder<Assert, ___T>)

Source§

async fn deassert(&mut self, responder: Responder<Deassert, ___T>)

Source§

async fn toggle(&mut self, responder: Responder<Toggle, ___T>)

Source§

async fn toggle_with_timeout( &mut self, request: Request<ToggleWithTimeout, ___T>, responder: Responder<ToggleWithTimeout, ___T>, )

Source§

async fn status(&mut self, responder: Responder<Status, ___T>)

Source§

async fn on_unknown_interaction(&mut self, ordinal: u64)

Implementors§