pub struct DevicePairSynchronousProxy { /* private fields */ }
Implementations§
Source§impl DevicePairSynchronousProxy
impl DevicePairSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DevicePairEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DevicePairEvent, 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 add_port(
&self,
config: &DevicePairPortConfig,
___deadline: MonotonicInstant,
) -> Result<DevicePairAddPortResult, Error>
pub fn add_port( &self, config: &DevicePairPortConfig, ___deadline: MonotonicInstant, ) -> Result<DevicePairAddPortResult, Error>
Adds a logical port to this device pair.
- request
config
port configuration.
- error
ZX_ERR_INVALID_ARGS
ifconfig
is invalid. - error
ZX_ERR_ALREADY_EXISTS
if the provided port identifier is already in use.
Sourcepub fn remove_port(
&self,
id: u8,
___deadline: MonotonicInstant,
) -> Result<DevicePairRemovePortResult, Error>
pub fn remove_port( &self, id: u8, ___deadline: MonotonicInstant, ) -> Result<DevicePairRemovePortResult, Error>
Removes a logical port created by
[fuchsia.net.tun/DevicePair.AddPort
].
- request
id
identifier of the port to remove.
- error
ZX_ERR_NOT_FOUND
ifid
does not map to an existing port.
Sourcepub fn get_left(&self, device: ServerEnd<DeviceMarker>) -> Result<(), Error>
pub fn get_left(&self, device: ServerEnd<DeviceMarker>) -> Result<(), Error>
Connects to the underlying left device endpoint.
- request
device
handle serve the left device endpoint on.
Sourcepub fn get_right(&self, device: ServerEnd<DeviceMarker>) -> Result<(), Error>
pub fn get_right(&self, device: ServerEnd<DeviceMarker>) -> Result<(), Error>
Connects to the underlying right device endpoint.
- request
device
handle serve the right device endpoint on.
Sourcepub fn get_left_port(
&self,
id: u8,
port: ServerEnd<PortMarker>,
) -> Result<(), Error>
pub fn get_left_port( &self, id: u8, port: ServerEnd<PortMarker>, ) -> Result<(), Error>
Connects to an underlying left port.
- request
id
requested port identifier. - request
port
grants access to the requested port on the left device.
Sourcepub fn get_right_port(
&self,
id: u8,
port: ServerEnd<PortMarker>,
) -> Result<(), Error>
pub fn get_right_port( &self, id: u8, port: ServerEnd<PortMarker>, ) -> Result<(), Error>
Connects to an underlying right port.
- request
id
requested port identifier. - request
port
grants access to the requested port on the right device.
Trait Implementations§
Source§impl Debug for DevicePairSynchronousProxy
impl Debug for DevicePairSynchronousProxy
Source§impl SynchronousProxy for DevicePairSynchronousProxy
impl SynchronousProxy for DevicePairSynchronousProxy
Source§type Proxy = DevicePairProxy
type Proxy = DevicePairProxy
The async proxy for the same protocol.
Source§type Protocol = DevicePairMarker
type Protocol = DevicePairMarker
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 DevicePairSynchronousProxy
impl RefUnwindSafe for DevicePairSynchronousProxy
impl Send for DevicePairSynchronousProxy
impl Sync for DevicePairSynchronousProxy
impl Unpin for DevicePairSynchronousProxy
impl UnwindSafe for DevicePairSynchronousProxy
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