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 Opcodepub const fn new(ogf: u16, ocf: u16) -> Opcode[src]
pub const fn new(ogf: u16, ocf: u16) -> OpcodeCreate an opcode from the OGF (Opcode group field) and OCF (Opcode command field).
pub fn ogf(&self) -> u16[src]
pub fn ogf(&self) -> u16Return the OGF (Opcode group field) of the opcode.
pub fn ocf(&self) -> u16[src]
pub fn ocf(&self) -> u16Return the OCF (Opcode command field) of the opcode.
Trait Implementations
impl Clone for Opcode[src]
impl Clone for Opcodefn clone(&self) -> Opcode[src]
fn clone(&self) -> OpcodeReturns 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 Opcodeimpl Debug for Opcode[src]
impl Debug for Opcodefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Opcode[src]
impl PartialEq for Opcodefn eq(&self, other: &Opcode) -> bool[src]
fn eq(&self, other: &Opcode) -> boolThis 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) -> boolThis method tests for !=.
impl Eq for Opcode[src]
impl Eq for Opcode