pub trait Control<'d> {
// Required methods
fn reserve_route(&mut self, id: u8) -> bool;
fn release_route(&mut self, id: u8);
fn submit_socket<Tag: Tag>(
&mut self,
flights: &Slots<'d, Tag>,
request: Bound<'d, Tag, SocketSlot<'d>>,
socket: StreamSpec,
) -> Result<CreatingSocket<'d>, SubmitError>;
fn submit_tuning<Tag: Tag>(
&mut self,
request: Bound<'d, Tag, Descriptor<'d>>,
options: StreamOptions,
) -> Result<Tuning<'d>, Descriptor<'d>>;
fn cancel_tuning(
&mut self,
pending: TuningPending<'d>,
) -> Result<TuningPending<'d, Cancelled>, (TuningPending<'d>, SubmitError)>;
fn cancel_connection(
&mut self,
pending: ConnectionPending<'d>,
) -> Result<ConnectionPending<'d, Cancelled>, (ConnectionPending<'d>, SubmitError)>;
}Expand description
Driver control operations whose routed resources retain their typed owner.
Raw tokens are not accepted by the safe submission boundary:
ⓘ
use dope_core::{
driver::{Context, flight, ops::Control, route::{KeyTag, Token}},
io::{fd::handles::SocketSlot, socket::StreamSpec},
};
fn submit<'d>(
driver: &mut Context<'_, 'd>,
flights: &flight::Slots<'d, KeyTag<1>>,
slot: SocketSlot<'d>,
socket: StreamSpec,
token: Token,
) {
let _ = Control::submit_socket(driver, flights, slot, socket, token);
}Required Methods§
fn reserve_route(&mut self, id: u8) -> bool
fn release_route(&mut self, id: u8)
fn submit_socket<Tag: Tag>( &mut self, flights: &Slots<'d, Tag>, request: Bound<'d, Tag, SocketSlot<'d>>, socket: StreamSpec, ) -> Result<CreatingSocket<'d>, SubmitError>
fn submit_tuning<Tag: Tag>( &mut self, request: Bound<'d, Tag, Descriptor<'d>>, options: StreamOptions, ) -> Result<Tuning<'d>, Descriptor<'d>>
fn cancel_tuning( &mut self, pending: TuningPending<'d>, ) -> Result<TuningPending<'d, Cancelled>, (TuningPending<'d>, SubmitError)>
fn cancel_connection( &mut self, pending: ConnectionPending<'d>, ) -> Result<ConnectionPending<'d, Cancelled>, (ConnectionPending<'d>, SubmitError)>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".