[−][src]Struct btle::hci::Opcode
16-bit HCI Opcode. Contains a OGF (OpCode Ground Field) and OCF (OpCode Command Field).
Methods
impl Opcode
[src]
pub const fn byte_len() -> usize
[src]
pub fn pack(self, buf: &mut [u8]) -> Result<(), HCIPackError>
[src]
Errors
returns HCIPackError::BadLength
if buf.len() != OPCODE_LEN
.
pub fn unpack(buf: &[u8]) -> Result<Opcode, HCIPackError>
[src]
Errors
returns HCIPackError::BadLength
if buf.len() != OPCODE_LEN
.
returns HCIPackError::BadBytes
if buf
doesn't contain a value opcode.
pub const fn nop() -> Opcode
[src]
pub fn is_nop(self) -> bool
[src]
Trait Implementations
impl Clone for Opcode
[src]
impl Copy for Opcode
[src]
impl Debug for Opcode
[src]
impl Default for Opcode
[src]
impl Eq for Opcode
[src]
impl From<LEControllerOpcode> for Opcode
[src]
fn from(opcode: LEControllerOpcode) -> Self
[src]
impl From<LinkControlOpcode> for Opcode
[src]
fn from(opcode: LinkControlOpcode) -> Self
[src]
impl From<Opcode> for u16
[src]
impl Hash for Opcode
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Opcode
[src]
fn cmp(&self, other: &Opcode) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Opcode> for Opcode
[src]
impl PartialOrd<Opcode> for Opcode
[src]
fn partial_cmp(&self, other: &Opcode) -> Option<Ordering>
[src]
fn lt(&self, other: &Opcode) -> bool
[src]
fn le(&self, other: &Opcode) -> bool
[src]
fn gt(&self, other: &Opcode) -> bool
[src]
fn ge(&self, other: &Opcode) -> bool
[src]
impl StructuralEq for Opcode
[src]
impl StructuralPartialEq for Opcode
[src]
impl TryFrom<u16> for Opcode
[src]
Auto Trait Implementations
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnwindSafe for Opcode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,