pub struct LastRejectCodeResponse { /* private fields */ }Expand description
LastRejectCode - Response (0x17)
Represents a response to an LastRejectCodeCommand message.
Implementations§
Source§impl LastRejectCodeResponse
impl LastRejectCodeResponse
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new LastRejectCodeResponse message.
Sourcepub fn reject_code(&self) -> LastRejectCode
pub fn reject_code(&self) -> LastRejectCode
Gets the LastRejectCode.
Sourcepub fn set_reject_code(&mut self, code: LastRejectCode)
pub fn set_reject_code(&mut self, code: LastRejectCode)
Sets the LastRejectCode.
Trait Implementations§
Source§impl Clone for LastRejectCodeResponse
impl Clone for LastRejectCodeResponse
Source§fn clone(&self) -> LastRejectCodeResponse
fn clone(&self) -> LastRejectCodeResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LastRejectCodeResponse
Source§impl Debug for LastRejectCodeResponse
impl Debug for LastRejectCodeResponse
Source§impl Default for LastRejectCodeResponse
impl Default for LastRejectCodeResponse
Source§impl Display for LastRejectCodeResponse
impl Display for LastRejectCodeResponse
Source§impl MessageOps for LastRejectCodeResponse
impl MessageOps for LastRejectCodeResponse
Source§fn set_data_len(&mut self, len: u8)
fn set_data_len(&mut self, len: u8)
Sets the data length of the message.
Source§fn message_type(&self) -> MessageType
fn message_type(&self) -> MessageType
Gets the message type.
Source§fn is_command(&self) -> bool
fn is_command(&self) -> bool
Gets whether the message is a command message.
Source§fn is_response(&self) -> bool
fn is_response(&self) -> bool
Gets whether the message is a response message.
Source§fn is_variable(&self) -> bool
fn is_variable(&self) -> bool
Gets whether the message has a variable data length.
Source§fn metadata_len(&self) -> usize
fn metadata_len(&self) -> usize
Gets the length of the metadata fields in the message buffer.
Source§fn sequence_id(&self) -> SequenceId
fn sequence_id(&self) -> SequenceId
Gets the SequenceId field.
Source§fn set_sequence_id(&mut self, id: SequenceId)
fn set_sequence_id(&mut self, id: SequenceId)
Sets the SequenceId field.
Source§fn toggle_sequence_id(&mut self)
fn toggle_sequence_id(&mut self)
Toggles the SequenceFlag value of the SequenceId.
fn set_data(&mut self, data: &[u8]) -> Result<()>
Source§fn toggle_sequence_flag(&mut self)
fn toggle_sequence_flag(&mut self)
Toggles the value of the SequenceFlag.
Source§fn calculate_checksum(&mut self) -> u16
fn calculate_checksum(&mut self) -> u16
Calculates the CRC-16 checksum of the message.
Source§fn verify_checksum(&self) -> Result<()>
fn verify_checksum(&self) -> Result<()>
Verifies the checksum in the message buffer matches the calculated value.
Source§impl PartialEq for LastRejectCodeResponse
impl PartialEq for LastRejectCodeResponse
Source§fn eq(&self, other: &LastRejectCodeResponse) -> bool
fn eq(&self, other: &LastRejectCodeResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl ResponseOps for LastRejectCodeResponse
impl ResponseOps for LastRejectCodeResponse
Source§fn response_status(&self) -> ResponseStatus
fn response_status(&self) -> ResponseStatus
Gets the Response status of the message.
Source§fn set_response_status(&mut self, status: ResponseStatus)
fn set_response_status(&mut self, status: ResponseStatus)
Sets the Response status of the message.
impl StructuralPartialEq for LastRejectCodeResponse
Source§impl TryFrom<&[u8]> for LastRejectCodeResponse
impl TryFrom<&[u8]> for LastRejectCodeResponse
Auto Trait Implementations§
impl Freeze for LastRejectCodeResponse
impl RefUnwindSafe for LastRejectCodeResponse
impl Send for LastRejectCodeResponse
impl Sync for LastRejectCodeResponse
impl Unpin for LastRejectCodeResponse
impl UnsafeUnpin for LastRejectCodeResponse
impl UnwindSafe for LastRejectCodeResponse
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