pub trait DriverClientSender {
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 = WireDriverStartRequest>;
fn stop(&self) -> Result<SendFuture<'_, Self::Transport>, EncodeError>;
}
Expand description
A helper trait for the Driver
client sender.
Required Associated Types§
Required Methods§
Sourcefn start<___R>(
&self,
request: &mut ___R,
) -> Result<ResponseFuture<'_, Self::Transport, Start>, EncodeError>where
___R: Encode<<Self::Transport as Transport>::SendBuffer, Encoded = WireDriverStartRequest>,
fn start<___R>(
&self,
request: &mut ___R,
) -> Result<ResponseFuture<'_, Self::Transport, Start>, EncodeError>where
___R: Encode<<Self::Transport as Transport>::SendBuffer, Encoded = WireDriverStartRequest>,
Starts the driver with the given |start_args|.
Drivers should finish their initial setup and enumeration before returning from |Start|.
In particular they should enumerate all currently available nodes by utilizing
fuchsia.driver.framework/Node.AddChild
and waiting for all calls to be completed.
The Framework will not consider the driver to be started until this call has returned successfully. Therefore a driver will not have |Stop| called on it until after it has replied to |Start| successfully.
If a driver returns an error, it will not have |Stop| called on it before the Driver Framework initiates shutdown of the driver’s dispatchers. Therefore it should have performed all necessary cleanup before returning an error.
Sourcefn stop(&self) -> Result<SendFuture<'_, Self::Transport>, EncodeError>
fn stop(&self) -> Result<SendFuture<'_, Self::Transport>, EncodeError>
Stops the driver. To stop, the driver should teardown any resources it set up in or after |Start|. This is a one-way FIDL method. When the driver has completed stopping, it should close its server end. Asynchronous operations should fully complete before closing the server end.
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> DriverClientSender for ClientSender<___T, Driver>where
___T: Transport,
impl<___T> DriverClientSender for ClientSender<___T, Driver>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 = WireDriverStartRequest>,
fn start<___R>(
&self,
request: &mut ___R,
) -> Result<ResponseFuture<'_, Self::Transport, Start>, EncodeError>where
___R: Encode<<Self::Transport as Transport>::SendBuffer, Encoded = WireDriverStartRequest>,
Starts the driver with the given |start_args|.
Drivers should finish their initial setup and enumeration before returning from |Start|.
In particular they should enumerate all currently available nodes by utilizing
fuchsia.driver.framework/Node.AddChild
and waiting for all calls to be completed.
The Framework will not consider the driver to be started until this call has returned successfully. Therefore a driver will not have |Stop| called on it until after it has replied to |Start| successfully.
If a driver returns an error, it will not have |Stop| called on it before the Driver Framework initiates shutdown of the driver’s dispatchers. Therefore it should have performed all necessary cleanup before returning an error.
Source§fn stop(&self) -> Result<SendFuture<'_, Self::Transport>, EncodeError>
fn stop(&self) -> Result<SendFuture<'_, Self::Transport>, EncodeError>
Stops the driver. To stop, the driver should teardown any resources it set up in or after |Start|. This is a one-way FIDL method. When the driver has completed stopping, it should close its server end. Asynchronous operations should fully complete before closing the server end.