Trait ControllerClientSender

Source
pub trait ControllerClientSender {
    type Transport: Transport;

    // Required methods
    fn start<___R>(
        &self,
        request: &mut ___R,
    ) -> Result<ResponseFuture<'_, Self::Transport, Start>, EncodeError>
       where ___R: Encode<<Self::Transport as Transport>::SendBuffer, Encoded = WireControllerStartRequest>;
    fn is_started(
        &self,
    ) -> Result<ResponseFuture<'_, Self::Transport, IsStarted>, EncodeError>;
    fn get_exposed_dictionary(
        &self,
    ) -> Result<ResponseFuture<'_, Self::Transport, GetExposedDictionary>, EncodeError>;
    fn destroy(
        &self,
    ) -> Result<ResponseFuture<'_, Self::Transport, Destroy>, EncodeError>;
}
Expand description

A helper trait for the Controller client sender.

Required Associated Types§

Source

type Transport: Transport

Required Methods§

Source

fn start<___R>( &self, request: &mut ___R, ) -> Result<ResponseFuture<'_, Self::Transport, Start>, EncodeError>
where ___R: Encode<<Self::Transport as Transport>::SendBuffer, Encoded = WireControllerStartRequest>,

Start the component, optionally providing additional handles to be given to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is currently running.

Source

fn is_started( &self, ) -> Result<ResponseFuture<'_, Self::Transport, IsStarted>, EncodeError>

Returns true if this instance is currently running.

Source

fn get_exposed_dictionary( &self, ) -> Result<ResponseFuture<'_, Self::Transport, GetExposedDictionary>, EncodeError>

Returns the dictionary containing the component’s exposed capabilities.

Source

fn destroy( &self, ) -> Result<ResponseFuture<'_, Self::Transport, Destroy>, EncodeError>

Destroys this component. When this method returns, either:

  • Ok was returned, indicating destruction has begun.
  • An error was returned, and destruction will not be attempted.

If Ok was returned, destruction will proceed in the background, but it hasn’t necessarily completed yet. When it completes, the framework will close this Controller channel.

Errors:

  • ACCESS_DENIED: Destruction of this component is not allowed. Currently, this can happen if the component is a static child of its parent.

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<___T> ControllerClientSender for ClientSender<___T, Controller>
where ___T: Transport,

Source§

fn start<___R>( &self, request: &mut ___R, ) -> Result<ResponseFuture<'_, Self::Transport, Start>, EncodeError>
where ___R: Encode<<Self::Transport as Transport>::SendBuffer, Encoded = WireControllerStartRequest>,

Start the component, optionally providing additional handles to be given to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is currently running.

Source§

fn is_started( &self, ) -> Result<ResponseFuture<'_, Self::Transport, IsStarted>, EncodeError>

Returns true if this instance is currently running.

Source§

fn get_exposed_dictionary( &self, ) -> Result<ResponseFuture<'_, Self::Transport, GetExposedDictionary>, EncodeError>

Returns the dictionary containing the component’s exposed capabilities.

Source§

fn destroy( &self, ) -> Result<ResponseFuture<'_, Self::Transport, Destroy>, EncodeError>

Destroys this component. When this method returns, either:

  • Ok was returned, indicating destruction has begun.
  • An error was returned, and destruction will not be attempted.

If Ok was returned, destruction will proceed in the background, but it hasn’t necessarily completed yet. When it completes, the framework will close this Controller channel.

Errors:

  • ACCESS_DENIED: Destruction of this component is not allowed. Currently, this can happen if the component is a static child of its parent.
Source§

type Transport = ___T

Implementors§