Struct fidl_fuchsia_hardware_network::PortProxy
source · pub struct PortProxy { /* private fields */ }
Implementations§
source§impl PortProxy
impl PortProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.network/Port.
sourcepub fn take_event_stream(&self) -> PortEventStream
pub fn take_event_stream(&self) -> PortEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn get_info(&self) -> QueryResponseFut<PortInfo>
pub fn get_info(&self) -> QueryResponseFut<PortInfo>
Obtain information about port.
- response
info
port information.
sourcepub fn get_status(&self) -> QueryResponseFut<PortStatus>
pub fn get_status(&self) -> QueryResponseFut<PortStatus>
Obtain the operating port status.
- response
status
snapshot of port’s current status.
sourcepub fn get_status_watcher(
&self,
watcher: ServerEnd<StatusWatcherMarker>,
buffer: u32,
) -> Result<(), Error>
pub fn get_status_watcher( &self, watcher: ServerEnd<StatusWatcherMarker>, buffer: u32, ) -> Result<(), Error>
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.
sourcepub fn get_mac(&self, mac: ServerEnd<MacAddressingMarker>) -> Result<(), Error>
pub fn get_mac(&self, mac: ServerEnd<MacAddressingMarker>) -> Result<(), Error>
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.
sourcepub fn get_device(&self, device: ServerEnd<DeviceMarker>) -> Result<(), Error>
pub fn get_device(&self, device: ServerEnd<DeviceMarker>) -> Result<(), Error>
Connects to the [Device
] this port belongs to.
- request
device
grants access to the parent device.
sourcepub fn clone(&self, port: ServerEnd<PortMarker>) -> Result<(), Error>
pub fn clone(&self, port: ServerEnd<PortMarker>) -> Result<(), Error>
Establishes a new connection to this port.
- request
port
the server end for the new connection.
sourcepub fn get_counters(&self) -> QueryResponseFut<PortGetCountersResponse>
pub fn get_counters(&self) -> QueryResponseFut<PortGetCountersResponse>
Retrieves a snapshot of traffic counters on this port.
sourcepub fn get_diagnostics(
&self,
diagnostics: ServerEnd<DiagnosticsMarker>,
) -> Result<(), Error>
pub fn get_diagnostics( &self, diagnostics: ServerEnd<DiagnosticsMarker>, ) -> Result<(), Error>
Grants access to [Diagnostics
] for this port.
- request
diagnostics
grants access to diagnostics information.
Trait Implementations§
source§impl PortProxyInterface for PortProxy
impl PortProxyInterface for PortProxy
type GetInfoResponseFut = QueryResponseFut<PortInfo>
fn get_info(&self) -> Self::GetInfoResponseFut
type GetStatusResponseFut = QueryResponseFut<PortStatus>
fn get_status(&self) -> Self::GetStatusResponseFut
fn get_status_watcher( &self, watcher: ServerEnd<StatusWatcherMarker>, buffer: u32, ) -> Result<(), Error>
fn get_mac(&self, mac: ServerEnd<MacAddressingMarker>) -> Result<(), Error>
fn get_device(&self, device: ServerEnd<DeviceMarker>) -> Result<(), Error>
fn clone(&self, port: ServerEnd<PortMarker>) -> Result<(), Error>
type GetCountersResponseFut = QueryResponseFut<PortGetCountersResponse>
fn get_counters(&self) -> Self::GetCountersResponseFut
fn get_diagnostics( &self, diagnostics: ServerEnd<DiagnosticsMarker>, ) -> Result<(), Error>
source§impl Proxy for PortProxy
impl Proxy for PortProxy
§type Protocol = PortMarker
type Protocol = PortMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Auto Trait Implementations§
impl Freeze for PortProxy
impl !RefUnwindSafe for PortProxy
impl Send for PortProxy
impl Sync for PortProxy
impl Unpin for PortProxy
impl !UnwindSafe for PortProxy
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)