pub struct StringIndex(/* private fields */);Expand description
String index for a String descriptor; allows a string to be associated with a particular item or control.
Implementations§
Source§impl StringIndex
impl StringIndex
Sourcepub const PREFIX: u8 = 120u8
pub const PREFIX: u8 = 120u8
Prefix consists of tag(bit 7-4), type(bit 3-2) and size(bit 1-0).
The “size” part is set to 00 in this constant value.
Sourcepub unsafe fn new_unchecked(raw: &[u8]) -> Self
pub unsafe fn new_unchecked(raw: &[u8]) -> Self
Sourcepub fn new_with(data: &[u8]) -> Result<Self, HidError>
pub fn new_with(data: &[u8]) -> Result<Self, HidError>
Create an item with specific data.
NOTE: data size must be: 0, 1, 2 or 4.
Trait Implementations§
Source§impl AsRef<[u8]> for StringIndex
impl AsRef<[u8]> for StringIndex
Source§impl Clone for StringIndex
impl Clone for StringIndex
Source§fn clone(&self) -> StringIndex
fn clone(&self) -> StringIndex
Returns a duplicate 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 StringIndex
impl Debug for StringIndex
Source§impl Default for StringIndex
impl Default for StringIndex
Source§impl Display for StringIndex
impl Display for StringIndex
Source§impl PartialEq for StringIndex
impl PartialEq for StringIndex
impl Eq for StringIndex
impl StructuralPartialEq for StringIndex
Auto Trait Implementations§
impl Freeze for StringIndex
impl RefUnwindSafe for StringIndex
impl Send for StringIndex
impl Sync for StringIndex
impl Unpin for StringIndex
impl UnwindSafe for StringIndex
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