Struct flipdot_core::Offset
source · pub struct Offset(pub u16);
Expand description
The memory offset for data sent via a SendData
message.
§Examples
use flipdot_core::{Data, Message, Offset};
let data = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
let message1 = Message::SendData(Offset(0), Data::try_new(&data)?);
let message2 = Message::SendData(Offset(16), Data::try_new(&data)?);
// These two messages would send a total of 32 bytes, repeating the sequence twice.
Tuple Fields§
§0: u16
Trait Implementations§
source§impl PartialEq for Offset
impl PartialEq for Offset
impl Copy for Offset
impl Eq for Offset
impl StructuralPartialEq for Offset
Auto Trait Implementations§
impl RefUnwindSafe for Offset
impl Send for Offset
impl Sync for Offset
impl Unpin for Offset
impl UnwindSafe for Offset
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