Struct bluetooth_hci::Opcode [−][src]
pub struct Opcode(pub u16);
Newtype wrapper for a Bluetooth Opcode. Opcodes are used to indicate which command to send to the Controller as well as which command results are returned by the Command Complete and Command Status events.
Methods
impl Opcode
[src]
impl Opcode
pub const fn new(ogf: u16, ocf: u16) -> Opcode
[src]
pub const fn new(ogf: u16, ocf: u16) -> Opcode
Create an opcode from the OGF (Opcode group field) and OCF (Opcode command field).
pub fn ogf(&self) -> u16
[src]
pub fn ogf(&self) -> u16
Return the OGF (Opcode group field) of the opcode.
pub fn ocf(&self) -> u16
[src]
pub fn ocf(&self) -> u16
Return the OCF (Opcode command field) of the opcode.
Trait Implementations
impl Clone for Opcode
[src]
impl Clone for Opcode
fn clone(&self) -> Opcode
[src]
fn clone(&self) -> Opcode
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Opcode
[src]
impl Copy for Opcode
impl Debug for Opcode
[src]
impl Debug for Opcode
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Opcode
[src]
impl PartialEq for Opcode
fn eq(&self, other: &Opcode) -> bool
[src]
fn eq(&self, other: &Opcode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Opcode) -> bool
[src]
fn ne(&self, other: &Opcode) -> bool
This method tests for !=
.
impl Eq for Opcode
[src]
impl Eq for Opcode