pub enum WireCommand {
Prepare {
invocation: u64,
operation: String,
payload: Vec<u8>,
},
Initialize {
invocation: u64,
context: [u8; 32],
},
Attempt {
invocation: u64,
context: [u8; 32],
values: Vec<CallValue>,
},
Finalize {
invocation: u64,
},
StreamAttempt {
invocation: u64,
epoch: u64,
context: [u8; 32],
values: Vec<CallValue>,
},
StreamSend {
invocation: u64,
epoch: u64,
payload: Vec<u8>,
},
StreamFinish {
invocation: u64,
epoch: u64,
},
StreamReceive {
invocation: u64,
epoch: u64,
},
PrepareGrpc {
invocation: u64,
operation: String,
payload: Vec<u8>,
},
}Variants§
Prepare
Initialize
Attempt
Finalize
StreamAttempt
StreamSend
StreamFinish
StreamReceive
PrepareGrpc
Implementations§
Source§impl WireCommand
impl WireCommand
Sourcepub fn prepare_encoded_len(
invocation: u64,
operation: &str,
payload: usize,
) -> Result<usize, WireCodecError>
pub fn prepare_encoded_len( invocation: u64, operation: &str, payload: usize, ) -> Result<usize, WireCodecError>
Counts the versioned Prepare envelope without encoding or allocating its payload.
pub fn encode(&self) -> Result<Vec<u8>, WireCodecError>
pub fn decode(bytes: &[u8]) -> Result<WireCommand, WireCodecError>
Trait Implementations§
Source§impl Debug for WireCommand
impl Debug for WireCommand
Source§impl<'de> Deserialize<'de> for WireCommand
impl<'de> Deserialize<'de> for WireCommand
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WireCommand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WireCommand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for WireCommand
impl Serialize for WireCommand
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for WireCommand
impl RefUnwindSafe for WireCommand
impl Send for WireCommand
impl Sync for WireCommand
impl Unpin for WireCommand
impl UnsafeUnpin for WireCommand
impl UnwindSafe for WireCommand
Blanket Implementations§
impl<T> Allocation for T
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