pub struct DLCI(/* private fields */);
Expand description
Identifier for a direct link connection (DLC) between devices.
Use the TryFrom<u8>
implementation to construct a valid DLCI.
The DLCI is 6 bits wide and consists of a direction bit and a 5-bit Server Channel number. DLCIs 1 and 62-63 are reserved and never used in RFCOMM. See RFCOMM 5.4.
Implementations§
Source§impl DLCI
impl DLCI
Sourcepub const MUX_CONTROL_DLCI: DLCI = _
pub const MUX_CONTROL_DLCI: DLCI = _
The control channel for the RFCOMM Multiplexer.
pub fn is_mux_control(&self) -> bool
pub fn is_user(&self) -> bool
Sourcepub fn validate(&self, role: Role) -> Result<(), RfcommError>
pub fn validate(&self, role: Role) -> Result<(), RfcommError>
Returns Ok(()) if the DLCI belongs to the side of the session with the
given role
- this is only applicable to User DLCIs.
The DLCI space is divided into two equal parts. RFCOMM 5.2 states: “…this partitions the DLCI value space such that server applications on the non- initiating device are reachable on DLCIs 2,4,6,…,60, and server applications on the initiating device are reachable on DLCIs 3,5,7,…,61.”
Trait Implementations§
Source§impl TryFrom<DLCI> for ServerChannel
impl TryFrom<DLCI> for ServerChannel
impl Copy for DLCI
impl Eq for DLCI
impl StructuralPartialEq for DLCI
Auto Trait Implementations§
impl Freeze for DLCI
impl RefUnwindSafe for DLCI
impl Send for DLCI
impl Sync for DLCI
impl Unpin for DLCI
impl UnwindSafe for DLCI
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
)