pub struct DeviceProxy { /* private fields */ }Implementations§
Source§impl DeviceProxy
impl DeviceProxy
Sourcepub fn take_event_stream(&self) -> DeviceEventStream
pub fn take_event_stream(&self) -> DeviceEventStream
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<DeviceInfo, FDomainResourceDialect>
pub fn get_info(&self) -> QueryResponseFut<DeviceInfo, FDomainResourceDialect>
Obtain information about device
- response
infodevice information.
Sourcepub fn open_session(
&self,
session_name: &str,
session_info: SessionInfo,
) -> QueryResponseFut<DeviceOpenSessionResult, FDomainResourceDialect>
pub fn open_session( &self, session_name: &str, session_info: SessionInfo, ) -> QueryResponseFut<DeviceOpenSessionResult, FDomainResourceDialect>
Opens a new session with the network device.
- request
session_nameis used as a debugging label attached to this session. - request
session_infocontains the necessary information to setup the session’s data exchange.
- response
sessiona handle to control the session. - response
fifosdata-plane FIFOs attached to the session.
- error
ZX_ERR_NOT_SUPPORTEDifsession_infocontains not supported frame types or descriptors set up. - error
ZX_ERR_INVALID_ARGSifsession_infois missing fields or contains invalid information. - error
ZX_ERR_INTERNALif the data VMO is rejected by the underlying device.
Sourcepub fn get_port(
&self,
id: &PortId,
port: ServerEnd<PortMarker>,
) -> Result<(), Error>
pub fn get_port( &self, id: &PortId, port: ServerEnd<PortMarker>, ) -> Result<(), Error>
Connects to a port the given id.
- request
idport to connect to. - request
portserver end of port channel.
port is closed with a ZX_ERR_NOT_FOUND epitaph if no port with id
exists.
Sourcepub fn get_port_watcher(
&self,
watcher: ServerEnd<PortWatcherMarker>,
) -> Result<(), Error>
pub fn get_port_watcher( &self, watcher: ServerEnd<PortWatcherMarker>, ) -> Result<(), Error>
Connects a [PortWatcher] to this device.
- request
watcherserver end of watcher channel.
Trait Implementations§
Source§impl Clone for DeviceProxy
impl Clone for DeviceProxy
Source§fn clone(&self) -> DeviceProxy
fn clone(&self) -> DeviceProxy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type GetInfoResponseFut = QueryResponseFut<DeviceInfo, FDomainResourceDialect>
type OpenSessionResponseFut = QueryResponseFut<Result<(ClientEnd<SessionMarker>, Fifos), i32>, FDomainResourceDialect>
fn get_info(&self) -> Self::GetInfoResponseFut
fn open_session( &self, session_name: &str, session_info: SessionInfo, ) -> Self::OpenSessionResponseFut
fn get_port( &self, id: &PortId, port: ServerEnd<PortMarker>, ) -> Result<(), Error>
fn get_port_watcher( &self, watcher: ServerEnd<PortWatcherMarker>, ) -> Result<(), Error>
fn clone(&self, device: ServerEnd<DeviceMarker>) -> Result<(), Error>
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
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) -> Result<Channel, Self>
fn into_channel(self) -> Result<Channel, Self>
Attempt to convert the proxy back into a channel. Read more
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Source§fn domain(&self) -> Arc<Client>
fn domain(&self) -> Arc<Client>
Get the client supporting this proxy. We call this a “domain” here because: Read more
Source§fn on_closed(&self) -> OnFDomainSignals
fn on_closed(&self) -> OnFDomainSignals
Returns a future that completes when the server receives the
PEER_CLOSED signal.Auto Trait Implementations§
impl Freeze for DeviceProxy
impl !RefUnwindSafe for DeviceProxy
impl Send for DeviceProxy
impl Sync for DeviceProxy
impl Unpin for DeviceProxy
impl UnsafeUnpin for DeviceProxy
impl !UnwindSafe for DeviceProxy
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§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
Converts the given service transport handle of type
T to [Self]