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
Obtain information about device
- response
info
device information.
Fields
§
responder: DeviceGetInfoResponder
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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeviceRequest
impl !RefUnwindSafe for DeviceRequest
impl Send for DeviceRequest
impl Sync for DeviceRequest
impl Unpin for DeviceRequest
impl !UnwindSafe for DeviceRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more