Struct jcm::UidResponse
source · #[repr(C)]pub struct UidResponse { /* private fields */ }Implementations§
source§impl UidResponse
impl UidResponse
sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new UidResponse.
sourcepub const fn code(&self) -> ResponseCode
pub const fn code(&self) -> ResponseCode
Gets the ResponseCode for the UidResponse.
sourcepub fn set_code(&mut self, code: ResponseCode)
pub fn set_code(&mut self, code: ResponseCode)
Sets the ResponseCode for the UidResponse.
sourcepub fn with_code(self, code: ResponseCode) -> Self
pub fn with_code(self, code: ResponseCode) -> Self
Builder function that sets the ResponseCode for the UidResponse.
sourcepub const fn uid(&self) -> u8
pub const fn uid(&self) -> u8
Gets the UID for the UidResponse.
sourcepub fn set_uid(&mut self, uid: u8)
pub fn set_uid(&mut self, uid: u8)
Sets the UID for the UidResponse.
sourcepub fn with_uid(self, uid: u8) -> Self
pub fn with_uid(self, uid: u8) -> Self
Builder function that sets the UID for the UidResponse.
sourcepub const fn len() -> usize
pub const fn len() -> usize
Gets the length of the UidResponse.
sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Gets whether the UidResponse is empty.
sourcepub fn to_bytes(&self, buf: &mut [u8]) -> Result<()>
pub fn to_bytes(&self, buf: &mut [u8]) -> Result<()>
Converts a UidResponse into a byte buffer.
sourcepub fn from_bytes(buf: &[u8]) -> Result<Self>
pub fn from_bytes(buf: &[u8]) -> Result<Self>
Converts a byte buffer into a UidResponse.
Trait Implementations§
source§impl Clone for UidResponse
impl Clone for UidResponse
source§fn clone(&self) -> UidResponse
fn clone(&self) -> UidResponse
Returns a copy 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 UidResponse
impl Debug for UidResponse
source§impl Default for UidResponse
impl Default for UidResponse
source§impl Display for UidResponse
impl Display for UidResponse
source§impl From<&UidResponse> for Response
impl From<&UidResponse> for Response
source§fn from(val: &UidResponse) -> Self
fn from(val: &UidResponse) -> Self
Converts to this type from the input type.
source§impl From<UidResponse> for Response
impl From<UidResponse> for Response
source§fn from(val: UidResponse) -> Self
fn from(val: UidResponse) -> Self
Converts to this type from the input type.
source§impl PartialEq for UidResponse
impl PartialEq for UidResponse
source§fn eq(&self, other: &UidResponse) -> bool
fn eq(&self, other: &UidResponse) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<&Response> for UidResponse
impl TryFrom<&Response> for UidResponse
source§impl TryFrom<Response> for UidResponse
impl TryFrom<Response> for UidResponse
impl Copy for UidResponse
impl Eq for UidResponse
impl StructuralPartialEq for UidResponse
Auto Trait Implementations§
impl Freeze for UidResponse
impl RefUnwindSafe for UidResponse
impl Send for UidResponse
impl Sync for UidResponse
impl Unpin for UidResponse
impl UnwindSafe for UidResponse
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