pub struct PortSynchronousProxy { /* private fields */ }
Implementations§
Source§impl PortSynchronousProxy
impl PortSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<PortEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<PortEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_info(&self, ___deadline: MonotonicInstant) -> Result<PortInfo, Error>
pub fn get_info(&self, ___deadline: MonotonicInstant) -> Result<PortInfo, Error>
Obtain information about port.
- response
info
port information.
Sourcepub fn get_status(
&self,
___deadline: MonotonicInstant,
) -> Result<PortStatus, Error>
pub fn get_status( &self, ___deadline: MonotonicInstant, ) -> Result<PortStatus, Error>
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,
___deadline: MonotonicInstant,
) -> Result<PortGetCountersResponse, Error>
pub fn get_counters( &self, ___deadline: MonotonicInstant, ) -> Result<PortGetCountersResponse, Error>
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 Debug for PortSynchronousProxy
impl Debug for PortSynchronousProxy
Source§impl SynchronousProxy for PortSynchronousProxy
impl SynchronousProxy for PortSynchronousProxy
Source§type Protocol = PortMarker
type Protocol = PortMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for PortSynchronousProxy
impl RefUnwindSafe for PortSynchronousProxy
impl Send for PortSynchronousProxy
impl Sync for PortSynchronousProxy
impl Unpin for PortSynchronousProxy
impl UnwindSafe for PortSynchronousProxy
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