Struct gstd::errors::ErrorReplyPayload
source · pub struct ErrorReplyPayload(pub Vec<u8>);
Expand description
New-type representing error reply payload. Expected to be utf-8 string.
Tuple Fields§
§0: Vec<u8>
Implementations§
source§impl ErrorReplyPayload
impl ErrorReplyPayload
sourcepub fn try_as_str(&self) -> Option<&str>
pub fn try_as_str(&self) -> Option<&str>
Represents self as utf-8 str, if possible.
sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Similar to Self::try_as_str
, but panics in None
case.
Preferable to use only for test purposes.
Trait Implementations§
source§impl Clone for ErrorReplyPayload
impl Clone for ErrorReplyPayload
source§fn clone(&self) -> ErrorReplyPayload
fn clone(&self) -> ErrorReplyPayload
Returns a copy of the value. Read more
1.0.0 · 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 ErrorReplyPayload
impl Debug for ErrorReplyPayload
source§impl Display for ErrorReplyPayload
impl Display for ErrorReplyPayload
source§impl PartialEq for ErrorReplyPayload
impl PartialEq for ErrorReplyPayload
impl Eq for ErrorReplyPayload
impl StructuralPartialEq for ErrorReplyPayload
Auto Trait Implementations§
impl Freeze for ErrorReplyPayload
impl RefUnwindSafe for ErrorReplyPayload
impl Send for ErrorReplyPayload
impl Sync for ErrorReplyPayload
impl Unpin for ErrorReplyPayload
impl UnwindSafe for ErrorReplyPayload
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more