pub trait DeviceLocalServerHandler<___T: Transport = Channel> {
// Required methods
fn get_info(
&mut self,
responder: Responder<GetInfo, ___T>,
) -> impl Future<Output = ()>;
fn open_session(
&mut self,
request: Request<OpenSession, ___T>,
responder: Responder<OpenSession, ___T>,
) -> impl Future<Output = ()>;
fn get_port(
&mut self,
request: Request<GetPort, ___T>,
) -> impl Future<Output = ()>;
fn get_port_watcher(
&mut self,
request: Request<GetPortWatcher, ___T>,
) -> impl Future<Output = ()>;
fn clone(
&mut self,
request: Request<Clone, ___T>,
) -> impl Future<Output = ()>;
}Expand description
A server handler for the Device protocol.
See Device for more details.
Required Methods§
Sourcefn get_info(
&mut self,
responder: Responder<GetInfo, ___T>,
) -> impl Future<Output = ()>
fn get_info( &mut self, responder: Responder<GetInfo, ___T>, ) -> impl Future<Output = ()>
Obtain information about device
- response
infodevice information.
Sourcefn open_session(
&mut self,
request: Request<OpenSession, ___T>,
responder: Responder<OpenSession, ___T>,
) -> impl Future<Output = ()>
fn open_session( &mut self, request: Request<OpenSession, ___T>, responder: Responder<OpenSession, ___T>, ) -> impl Future<Output = ()>
Opens a new session with the network device.
- request
session_nameis used as a debugging label attached to this session. - request
session_infocontains the necessary information to setup the session’s data exchange.
- response
sessiona handle to control the session. - response
fifosdata-plane FIFOs attached to the session.
- error
ZX_ERR_NOT_SUPPORTEDifsession_infocontains not supported frame types or descriptors set up. - error
ZX_ERR_INVALID_ARGSifsession_infois missing fields or contains invalid information. - error
ZX_ERR_INTERNALif the data VMO is rejected by the underlying device.
Sourcefn get_port(
&mut self,
request: Request<GetPort, ___T>,
) -> impl Future<Output = ()>
fn get_port( &mut self, request: Request<GetPort, ___T>, ) -> impl Future<Output = ()>
Connects to a port the given id.
- request
idport to connect to. - request
portserver end of port channel.
port is closed with a ZX_ERR_NOT_FOUND epitaph if no port with id
exists.
Sourcefn get_port_watcher(
&mut self,
request: Request<GetPortWatcher, ___T>,
) -> impl Future<Output = ()>
fn get_port_watcher( &mut self, request: Request<GetPortWatcher, ___T>, ) -> impl Future<Output = ()>
Connects a PortWatcher to this device.
- request
watcherserver end of watcher channel.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".