pub enum Command<'a> {
Wait {
correlation_id: Option<u32>,
poll: Option<u32>,
},
Sync {
version: Bytes<'a>,
correlation_id: Option<u32>,
poll: Option<u32>,
},
Write {
version: Bytes<'a>,
correlation_id: Option<u32>,
offset: u32,
data: Bytes<'a>,
},
Swap {
version: Bytes<'a>,
correlation_id: Option<u32>,
checksum: Bytes<'a>,
},
}Variants§
Implementations§
Source§impl<'a> Command<'a>
impl<'a> Command<'a>
pub fn new_wait(poll: Option<u32>, correlation_id: Option<u32>) -> Self
pub fn new_sync( version: &'a [u8], poll: Option<u32>, correlation_id: Option<u32>, ) -> Self
pub fn new_swap( version: &'a [u8], checksum: &'a [u8], correlation_id: Option<u32>, ) -> Self
pub fn new_write( version: &'a [u8], offset: u32, data: &'a [u8], correlation_id: Option<u32>, ) -> Self
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Command<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Command<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Command<'a>
impl<'a> RefUnwindSafe for Command<'a>
impl<'a> Send for Command<'a>
impl<'a> Sync for Command<'a>
impl<'a> Unpin for Command<'a>
impl<'a> UnwindSafe for Command<'a>
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