pub struct QrtrClientConnectionSynchronousProxy { /* private fields */ }Implementations§
Source§impl QrtrClientConnectionSynchronousProxy
impl QrtrClientConnectionSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<QrtrClientConnectionEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<QrtrClientConnectionEvent, 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 read(
&self,
___deadline: MonotonicInstant,
) -> Result<QrtrClientConnectionReadResult, Error>
pub fn read( &self, ___deadline: MonotonicInstant, ) -> Result<QrtrClientConnectionReadResult, Error>
Reads a QRTR frame via the connection.
Only one read request can be performed at a time.
src_node_id: Source node ID of the QRTR frame.src_port: Source port of the QRTR frame.data: QRTR payload.
- Errors:
WOULD_BLOCK: Cannot read; should wait in non-blocking mode.ALREADY_PENDING: More than one read operation is pending in blocking mode.INTERNAL_ERROR: Unexpected QRTR error.
Sourcepub fn write(
&self,
dst_node_id: u32,
dst_port: u32,
data: &[u8],
___deadline: MonotonicInstant,
) -> Result<QrtrClientConnectionWriteResult, Error>
pub fn write( &self, dst_node_id: u32, dst_port: u32, data: &[u8], ___deadline: MonotonicInstant, ) -> Result<QrtrClientConnectionWriteResult, Error>
Writes a QRTR frame.
Only one write request can be performed at a time.
- Errors:
WOULD_BLOCK: Cannot write; should wait in non-blocking mode.ALREADY_PENDING: More than one write operation is pending in blocking mode.REMOTE_NODE_UNAVAILABLE: Target node unavailable.INTERNAL_ERROR: Unexpected QRTR error.
Sourcepub fn get_signals(
&self,
___deadline: MonotonicInstant,
) -> Result<EventPair, Error>
pub fn get_signals( &self, ___deadline: MonotonicInstant, ) -> Result<EventPair, Error>
Retrieves the signals eventpair.
- response
signalsan eventpair that is signalled withSIGNAL_READABLEandSIGNAL_WRITABLEwhen read and write buffers are available, respectively.
Sourcepub fn get_port_id(&self, ___deadline: MonotonicInstant) -> Result<u32, Error>
pub fn get_port_id(&self, ___deadline: MonotonicInstant) -> Result<u32, Error>
Retrieves the port id.
Sourcepub fn get_node_id(&self, ___deadline: MonotonicInstant) -> Result<u32, Error>
pub fn get_node_id(&self, ___deadline: MonotonicInstant) -> Result<u32, Error>
Retrieves the node id of AP.
Sourcepub fn close_connection(
&self,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn close_connection( &self, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Close the connection.
Server end drops its end of the channel after replying. This can be used for synchronous resource release.
Trait Implementations§
Source§impl From<Channel> for QrtrClientConnectionSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for QrtrClientConnectionSynchronousProxy
Available on Fuchsia only.
Source§impl From<QrtrClientConnectionSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<QrtrClientConnectionSynchronousProxy> for NullableHandle
Available on Fuchsia only.
Source§fn from(value: QrtrClientConnectionSynchronousProxy) -> Self
fn from(value: QrtrClientConnectionSynchronousProxy) -> Self
Converts to this type from the input type.
Source§impl FromClient for QrtrClientConnectionSynchronousProxy
Available on Fuchsia only.
impl FromClient for QrtrClientConnectionSynchronousProxy
Available on Fuchsia only.
Source§type Protocol = QrtrClientConnectionMarker
type Protocol = QrtrClientConnectionMarker
The protocol.
Source§fn from_client(value: ClientEnd<QrtrClientConnectionMarker>) -> Self
fn from_client(value: ClientEnd<QrtrClientConnectionMarker>) -> Self
Converts from a client.
Source§impl SynchronousProxy for QrtrClientConnectionSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for QrtrClientConnectionSynchronousProxy
Available on Fuchsia only.
Source§type Proxy = QrtrClientConnectionProxy
type Proxy = QrtrClientConnectionProxy
The async proxy for the same protocol.
Source§type Protocol = QrtrClientConnectionMarker
type Protocol = QrtrClientConnectionMarker
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 QrtrClientConnectionSynchronousProxy
impl RefUnwindSafe for QrtrClientConnectionSynchronousProxy
impl Send for QrtrClientConnectionSynchronousProxy
impl Sync for QrtrClientConnectionSynchronousProxy
impl Unpin for QrtrClientConnectionSynchronousProxy
impl UnsafeUnpin for QrtrClientConnectionSynchronousProxy
impl UnwindSafe for QrtrClientConnectionSynchronousProxy
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