pub struct MuxCommand {
pub params: MuxCommandParams,
pub command_response: CommandResponse,
}
Expand description
Represents an RFCOMM multiplexer command.
Fields§
§params: MuxCommandParams
The parameters associated with this MuxCommand - see RFCOMM 4.3 for the supported commands.
command_response: CommandResponse
Whether this is a command or response Mux frame.
Implementations§
Source§impl MuxCommand
impl MuxCommand
Sourcepub fn dlci(&self) -> Option<DLCI>
pub fn dlci(&self) -> Option<DLCI>
Returns the DLCI that the MuxCommand is referring to.
Note: This is different from the DLCI that the MuxCommand is sent over. All RFCOMM Mux Commands are sent over the Mux Control DLCI. The DLCI that the command itself is referring to is different. Some commands are generic (i.e Test Command) and do not refer to a particular DLCI; in these cases, None is returned.
Sourcepub fn identifier(&self) -> MuxCommandIdentifier
pub fn identifier(&self) -> MuxCommandIdentifier
Returns the “identifier” for this MuxCommand. Namely, it is the combination of the (optional) DLCI for this command and its command type.
Trait Implementations§
Source§impl Clone for MuxCommand
impl Clone for MuxCommand
Source§fn clone(&self) -> MuxCommand
fn clone(&self) -> MuxCommand
Returns a copy of the value. Read more
1.0.0 · 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 MuxCommand
impl Debug for MuxCommand
Source§impl Decodable for MuxCommand
impl Decodable for MuxCommand
type Error = FrameParseError
Source§impl Encodable for MuxCommand
impl Encodable for MuxCommand
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the command.
- 1 Byte for Type field + n bytes to encode the length +
length
bytes for the payload.
type Error = FrameParseError
Source§impl PartialEq for MuxCommand
impl PartialEq for MuxCommand
impl StructuralPartialEq for MuxCommand
Auto Trait Implementations§
impl Freeze for MuxCommand
impl RefUnwindSafe for MuxCommand
impl Send for MuxCommand
impl Sync for MuxCommand
impl Unpin for MuxCommand
impl UnwindSafe for MuxCommand
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)