pub enum DeviceRequest {
GetInfo {
responder: DeviceGetInfoResponder,
},
OpenSession {
session_name: String,
session_info: SessionInfo,
responder: DeviceOpenSessionResponder,
},
GetPort {
id: PortId,
port: ServerEnd<PortMarker>,
control_handle: DeviceControlHandle,
},
GetPortWatcher {
watcher: ServerEnd<PortWatcherMarker>,
control_handle: DeviceControlHandle,
},
Clone {
device: ServerEnd<DeviceMarker>,
control_handle: DeviceControlHandle,
},
}
Expand description
A Network Device.
Variants§
GetInfo
Fields
§
responder: DeviceGetInfoResponder
Obtain information about device
- response
info
device information.
OpenSession
Opens a new session with the network device.
- request
session_name
is used as a debugging label attached to this session. - request
session_info
contains the necessary information to setup the session’s data exchange.
- response
session
a handle to control the session. - response
fifos
data-plane FIFOs attached to the session.
- error
ZX_ERR_NOT_SUPPORTED
ifsession_info
contains not supported frame types or descriptors set up. - error
ZX_ERR_INVALID_ARGS
ifsession_info
is missing fields or contains invalid information. - error
ZX_ERR_INTERNAL
if the data VMO is rejected by the underlying device.
GetPort
Connects to a port the given id
.
- request
id
port to connect to. - request
port
server end of port channel.
port
is closed with a ZX_ERR_NOT_FOUND
epitaph if no port with id
exists.
GetPortWatcher
Connects a [PortWatcher
] to this device.
- request
watcher
server end of watcher channel.
Clone
Establishes a new connection to this device.
- request
device
the server end for the new connection.
Implementations§
source§impl DeviceRequest
impl DeviceRequest
pub fn into_get_info(self) -> Option<DeviceGetInfoResponder>
pub fn into_open_session( self ) -> Option<(String, SessionInfo, DeviceOpenSessionResponder)>
pub fn into_get_port( self ) -> Option<(PortId, ServerEnd<PortMarker>, DeviceControlHandle)>
pub fn into_get_port_watcher( self ) -> Option<(ServerEnd<PortWatcherMarker>, DeviceControlHandle)>
pub fn into_clone( self ) -> Option<(ServerEnd<DeviceMarker>, DeviceControlHandle)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL