pub enum QrtrClientConnectionRequest {
Read {
responder: QrtrClientConnectionReadResponder,
},
Write {
dst_node_id: u32,
dst_port: u32,
data: Vec<u8>,
responder: QrtrClientConnectionWriteResponder,
},
GetSignals {
responder: QrtrClientConnectionGetSignalsResponder,
},
GetPortId {
responder: QrtrClientConnectionGetPortIdResponder,
},
GetNodeId {
responder: QrtrClientConnectionGetNodeIdResponder,
},
CloseConnection {
responder: QrtrClientConnectionCloseConnectionResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: QrtrClientConnectionControlHandle,
method_type: MethodType,
},
}Expand description
The connection used between a QRTR client and the QRTR driver.
Variants§
Read
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.
Fields
§
responder: QrtrClientConnectionReadResponderWrite
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.
GetSignals
Retrieves the signals eventpair.
- response
signalsan eventpair that is signalled withSIGNAL_READABLEandSIGNAL_WRITABLEwhen read and write buffers are available, respectively.
Fields
§
responder: QrtrClientConnectionGetSignalsResponderGetPortId
Retrieves the port id.
Fields
§
responder: QrtrClientConnectionGetPortIdResponderGetNodeId
Retrieves the node id of AP.
Fields
§
responder: QrtrClientConnectionGetNodeIdResponderCloseConnection
Close the connection.
Server end drops its end of the channel after replying. This can be used for synchronous resource release.
Fields
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: QrtrClientConnectionControlHandle§
method_type: MethodTypeImplementations§
Source§impl QrtrClientConnectionRequest
impl QrtrClientConnectionRequest
pub fn into_read(self) -> Option<QrtrClientConnectionReadResponder>
pub fn into_write( self, ) -> Option<(u32, u32, Vec<u8>, QrtrClientConnectionWriteResponder)>
pub fn into_get_signals(self) -> Option<QrtrClientConnectionGetSignalsResponder>
pub fn into_get_port_id(self) -> Option<QrtrClientConnectionGetPortIdResponder>
pub fn into_get_node_id(self) -> Option<QrtrClientConnectionGetNodeIdResponder>
pub fn into_close_connection( self, ) -> Option<QrtrClientConnectionCloseConnectionResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QrtrClientConnectionRequest
impl !RefUnwindSafe for QrtrClientConnectionRequest
impl Send for QrtrClientConnectionRequest
impl Sync for QrtrClientConnectionRequest
impl Unpin for QrtrClientConnectionRequest
impl UnsafeUnpin for QrtrClientConnectionRequest
impl !UnwindSafe for QrtrClientConnectionRequest
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