pub enum ScoConnectionRequest {
Read {
responder: ScoConnectionReadResponder,
},
Write {
payload: ScoConnectionWriteRequest,
responder: ScoConnectionWriteResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: ScoConnectionControlHandle,
method_type: MethodType,
},
}
Expand description
A SCO connection. The connection is pending until the OnConnectionComplete
event is sent,
which will always arrive first. If the connection fails, the protocol will be closed after the
error is delivered. If methods are called before the OnConnectionComplete
event, they will
and the protocol will be closed.
Variants§
Read
Read the next inbound SCO payload. Hangs until new data is received. Only one Read request may be pending at a time. Additional requests will result in protocol closure.
Fields
responder: ScoConnectionReadResponder
Write
Write data
to the SCO connection.
If Write tries to send more data than max_tx_data_size
, the protocol will be closed.
Only one Write request may be pending at a time. Additional requests will result in protocol
closure.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ScoConnectionControlHandle
method_type: MethodType
Implementations§
Source§impl ScoConnectionRequest
impl ScoConnectionRequest
pub fn into_read(self) -> Option<ScoConnectionReadResponder>
pub fn into_write( self, ) -> Option<(ScoConnectionWriteRequest, ScoConnectionWriteResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL