pub struct EncodedPayload(/* private fields */);Expand description
Opaque binary payload returned by binary Corsa endpoints.
§Examples
use corsa_client::EncodedPayload;
let payload = EncodedPayload::new(vec![1, 2, 3]);
assert_eq!(payload.as_bytes(), &[1, 2, 3]);
assert_eq!(payload.clone().into_bytes(), vec![1, 2, 3]);Implementations§
Trait Implementations§
Source§impl Clone for EncodedPayload
impl Clone for EncodedPayload
Source§fn clone(&self) -> EncodedPayload
fn clone(&self) -> EncodedPayload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EncodedPayload
impl Debug for EncodedPayload
Source§impl PartialEq for EncodedPayload
impl PartialEq for EncodedPayload
Source§fn eq(&self, other: &EncodedPayload) -> bool
fn eq(&self, other: &EncodedPayload) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for EncodedPayload
impl StructuralPartialEq for EncodedPayload
Auto Trait Implementations§
impl Freeze for EncodedPayload
impl RefUnwindSafe for EncodedPayload
impl Send for EncodedPayload
impl Sync for EncodedPayload
impl Unpin for EncodedPayload
impl UnsafeUnpin for EncodedPayload
impl UnwindSafe for EncodedPayload
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