pub enum WireAnswer {
Stream {
epoch: u64,
transferred: bool,
payload: Option<Vec<u8>>,
},
Ready {
payload: Vec<u8>,
},
Failed {
failure: Failure,
},
}Variants§
Implementations§
Source§impl WireAnswer
impl WireAnswer
Sourcepub fn ready_encoded_len(payload: usize) -> Result<usize, WireCodecError>
pub fn ready_encoded_len(payload: usize) -> Result<usize, WireCodecError>
Counts the versioned Ready envelope without encoding or allocating its payload.
pub fn encode(&self) -> Result<Vec<u8>, WireCodecError>
pub fn decode(bytes: &[u8]) -> Result<Self, WireCodecError>
Trait Implementations§
Source§impl Debug for WireAnswer
impl Debug for WireAnswer
Source§impl<'de> Deserialize<'de> for WireAnswer
impl<'de> Deserialize<'de> for WireAnswer
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 Freeze for WireAnswer
impl RefUnwindSafe for WireAnswer
impl Send for WireAnswer
impl Sync for WireAnswer
impl Unpin for WireAnswer
impl UnsafeUnpin for WireAnswer
impl UnwindSafe for WireAnswer
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