pub enum PortRequest {
GetInfo {
responder: PortGetInfoResponder,
},
GetStatus {
responder: PortGetStatusResponder,
},
GetStatusWatcher {
watcher: ServerEnd<StatusWatcherMarker>,
buffer: u32,
control_handle: PortControlHandle,
},
GetMac {
mac: ServerEnd<MacAddressingMarker>,
control_handle: PortControlHandle,
},
GetDevice {
device: ServerEnd<DeviceMarker>,
control_handle: PortControlHandle,
},
Clone {
port: ServerEnd<PortMarker>,
control_handle: PortControlHandle,
},
GetCounters {
responder: PortGetCountersResponder,
},
GetDiagnostics {
diagnostics: ServerEnd<DiagnosticsMarker>,
control_handle: PortControlHandle,
},
}Expand description
A logical port belonging to a [Device].
Variants§
GetInfo
Obtain information about port.
- response
infoport information.
Fields
§
responder: PortGetInfoResponderGetStatus
Obtain the operating port status.
- response
statussnapshot of port’s current status.
Fields
§
responder: PortGetStatusResponderGetStatusWatcher
Connects to a [StatusWatcher] to observe port status changes.
- request
watcherhandle to the status watcher. - request
bufferthe number of status changes that the client requests to be stored byStatusWatcher. Values are capped atMAX_STATUS_BUFFER. A value of 0 or 1 causes theStatusWatcherto not keep any buffers on status changed. Clients that need to observe all changes to status (as opposed to only the current state) are encouraged to set a buffer value larger than 1, so that all edges can be observed. IfStatusWatcher’s internal queue is filled and new status changes occur, the oldest samples will be dropped to make room for new ones.
GetMac
Connects to a [MacAddressing] associated with the port.
- request
macmac handle. Closed withZX_ERR_NOT_SUPPORTEDif this port does not support mac addressing.
GetDevice
Connects to the [Device] this port belongs to.
- request
devicegrants access to the parent device.
Clone
Establishes a new connection to this port.
- request
portthe server end for the new connection.
GetCounters
Retrieves a snapshot of traffic counters on this port.
Fields
§
responder: PortGetCountersResponderGetDiagnostics
Grants access to [Diagnostics] for this port.
- request
diagnosticsgrants access to diagnostics information.
Implementations§
Source§impl PortRequest
impl PortRequest
pub fn into_get_info(self) -> Option<PortGetInfoResponder>
pub fn into_get_status(self) -> Option<PortGetStatusResponder>
pub fn into_get_status_watcher( self, ) -> Option<(ServerEnd<StatusWatcherMarker>, u32, PortControlHandle)>
pub fn into_get_mac( self, ) -> Option<(ServerEnd<MacAddressingMarker>, PortControlHandle)>
pub fn into_get_device( self, ) -> Option<(ServerEnd<DeviceMarker>, PortControlHandle)>
pub fn into_clone(self) -> Option<(ServerEnd<PortMarker>, PortControlHandle)>
pub fn into_get_counters(self) -> Option<PortGetCountersResponder>
pub fn into_get_diagnostics( self, ) -> Option<(ServerEnd<DiagnosticsMarker>, PortControlHandle)>
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 PortRequest
impl !RefUnwindSafe for PortRequest
impl Send for PortRequest
impl Sync for PortRequest
impl Unpin for PortRequest
impl !UnwindSafe for PortRequest
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