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
info
port information.
Fields
§
responder: PortGetInfoResponder
GetStatus
Obtain the operating port status.
- response
status
snapshot of port’s current status.
Fields
§
responder: PortGetStatusResponder
GetStatusWatcher
Connects to a [StatusWatcher
] to observe port status changes.
- request
watcher
handle to the status watcher. - request
buffer
the 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 theStatusWatcher
to 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
mac
mac handle. Closed withZX_ERR_NOT_SUPPORTED
if this port does not support mac addressing.
GetDevice
Connects to the [Device
] this port belongs to.
- request
device
grants access to the parent device.
Clone
Establishes a new connection to this port.
- request
port
the server end for the new connection.
GetCounters
Retrieves a snapshot of traffic counters on this port.
Fields
§
responder: PortGetCountersResponder
GetDiagnostics
Grants access to [Diagnostics
] for this port.
- request
diagnostics
grants 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