pub struct PortProxy { /* private fields */ }Implementations§
Source§impl PortProxy
impl PortProxy
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, FDomainResourceDialect> ⓘ
pub fn get_info(&self) -> QueryResponseFut<PortInfo, FDomainResourceDialect> ⓘ
Obtain information about port.
- response
infoport information.
Sourcepub fn get_status(&self) -> QueryResponseFut<PortStatus, FDomainResourceDialect> ⓘ
pub fn get_status(&self) -> QueryResponseFut<PortStatus, FDomainResourceDialect> ⓘ
Obtain the operating port status.
- response
statussnapshot 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
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.
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
macmac handle. Closed withZX_ERR_NOT_SUPPORTEDif 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
devicegrants 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
portthe server end for the new connection.
Sourcepub fn get_counters(
&self,
) -> QueryResponseFut<PortGetCountersResponse, FDomainResourceDialect> ⓘ
pub fn get_counters( &self, ) -> QueryResponseFut<PortGetCountersResponse, FDomainResourceDialect> ⓘ
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
diagnosticsgrants access to diagnostics information.
Sourcepub fn get_identity(&self) -> QueryResponseFut<Event, FDomainResourceDialect> ⓘ
pub fn get_identity(&self) -> QueryResponseFut<Event, FDomainResourceDialect> ⓘ
Retrieves a unique event handle that is always associated only with this port.
This event may be used to uniquely identify a specific port instance across different APIs in the system.
Sourcepub fn get_power_dependency_token(
&self,
) -> QueryResponseFut<Option<Event>, FDomainResourceDialect> ⓘ
pub fn get_power_dependency_token( &self, ) -> QueryResponseFut<Option<Event>, FDomainResourceDialect> ⓘ
Gets the Power Broker dependency token for this port’s power element.
The token exposes two levels: 0 (off) and 1 (on). Clients lease
level 1 whenever the port’s datapath is required and hold the lease
for as long as it is required. Drivers are free to internally
power-manage a leased-but-idle port so long as it’s invisible to upper
layers.
The token is fixed for the lifetime of the port.
- response
tokenabsent if this port does not participate in power management.
Trait Implementations§
Source§impl PortProxyInterface for PortProxy
impl PortProxyInterface for PortProxy
type GetInfoResponseFut = QueryResponseFut<PortInfo, FDomainResourceDialect>
type GetStatusResponseFut = QueryResponseFut<PortStatus, FDomainResourceDialect>
type GetCountersResponseFut = QueryResponseFut<PortGetCountersResponse, FDomainResourceDialect>
type GetIdentityResponseFut = QueryResponseFut<Event, FDomainResourceDialect>
type GetPowerDependencyTokenResponseFut = QueryResponseFut<Option<Event>, FDomainResourceDialect>
fn get_info(&self) -> Self::GetInfoResponseFut
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>
fn get_counters(&self) -> Self::GetCountersResponseFut
fn get_diagnostics( &self, diagnostics: ServerEnd<DiagnosticsMarker>, ) -> Result<(), Error>
fn get_identity(&self) -> Self::GetIdentityResponseFut
fn get_power_dependency_token(&self) -> Self::GetPowerDependencyTokenResponseFut
Source§impl Proxy for PortProxy
impl Proxy for PortProxy
Source§type Protocol = PortMarker
type Protocol = PortMarker
Proxy controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Source§fn into_channel(self) -> Result<Channel, Self>
fn into_channel(self) -> Result<Channel, Self>
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Source§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§fn domain(&self) -> Arc<Client> ⓘ
fn domain(&self) -> Arc<Client> ⓘ
Source§fn on_closed(&self) -> OnFDomainSignals ⓘ
fn on_closed(&self) -> OnFDomainSignals ⓘ
PEER_CLOSED signal.Auto Trait Implementations§
impl !RefUnwindSafe for PortProxy
impl !UnwindSafe for PortProxy
impl Freeze for PortProxy
impl Send for PortProxy
impl Sync for PortProxy
impl Unpin for PortProxy
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]