pub struct ByteVecUciMessage {
pub message: UciMessage,
pub bytes: Vec<u8>,
}Expand description
A wrapper that keeps the serialized form in a byte vector. Mostly useful to provide an AsRef<[u8]> implementation for
quick conversion to an array of bytes. Use the ::from(m: UciMessage) to construct it. It will add the newline
character \n to the serialized message.
Fields§
§message: UciMessage§bytes: Vec<u8>Trait Implementations§
Source§impl AsRef<[u8]> for ByteVecUciMessage
impl AsRef<[u8]> for ByteVecUciMessage
Source§impl AsRef<UciMessage> for ByteVecUciMessage
impl AsRef<UciMessage> for ByteVecUciMessage
Source§fn as_ref(&self) -> &UciMessage
fn as_ref(&self) -> &UciMessage
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for ByteVecUciMessage
impl Clone for ByteVecUciMessage
Source§fn clone(&self) -> ByteVecUciMessage
fn clone(&self) -> ByteVecUciMessage
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 ByteVecUciMessage
impl Debug for ByteVecUciMessage
Source§impl Display for ByteVecUciMessage
impl Display for ByteVecUciMessage
Source§impl From<UciMessage> for ByteVecUciMessage
impl From<UciMessage> for ByteVecUciMessage
Source§fn from(m: UciMessage) -> Self
fn from(m: UciMessage) -> Self
Converts to this type from the input type.
Source§impl Hash for ByteVecUciMessage
impl Hash for ByteVecUciMessage
Source§impl Into<UciMessage> for ByteVecUciMessage
impl Into<UciMessage> for ByteVecUciMessage
Source§fn into(self) -> UciMessage
fn into(self) -> UciMessage
Converts this type into the (usually inferred) input type.
Source§impl PartialEq for ByteVecUciMessage
impl PartialEq for ByteVecUciMessage
impl Eq for ByteVecUciMessage
impl StructuralPartialEq for ByteVecUciMessage
Auto Trait Implementations§
impl Freeze for ByteVecUciMessage
impl RefUnwindSafe for ByteVecUciMessage
impl Send for ByteVecUciMessage
impl Sync for ByteVecUciMessage
impl Unpin for ByteVecUciMessage
impl UnwindSafe for ByteVecUciMessage
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