pub struct RpcErrorCode(/* private fields */);Implementations§
Source§impl RpcErrorCode
impl RpcErrorCode
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
pub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
Creates validated text metadata.
§Errors
Returns ApiPrimitiveError when the value is empty or contains control characters.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the value and returns the stored text.
Trait Implementations§
Source§impl AsRef<str> for RpcErrorCode
impl AsRef<str> for RpcErrorCode
Source§impl Clone for RpcErrorCode
impl Clone for RpcErrorCode
Source§fn clone(&self) -> RpcErrorCode
fn clone(&self) -> RpcErrorCode
Returns a duplicate 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 RpcErrorCode
impl Debug for RpcErrorCode
Source§impl Display for RpcErrorCode
impl Display for RpcErrorCode
Source§impl FromStr for RpcErrorCode
impl FromStr for RpcErrorCode
Source§impl Hash for RpcErrorCode
impl Hash for RpcErrorCode
Source§impl Ord for RpcErrorCode
impl Ord for RpcErrorCode
Source§fn cmp(&self, other: &RpcErrorCode) -> Ordering
fn cmp(&self, other: &RpcErrorCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RpcErrorCode
impl PartialEq for RpcErrorCode
Source§impl PartialOrd for RpcErrorCode
impl PartialOrd for RpcErrorCode
Source§impl TryFrom<&str> for RpcErrorCode
impl TryFrom<&str> for RpcErrorCode
impl Eq for RpcErrorCode
impl StructuralPartialEq for RpcErrorCode
Auto Trait Implementations§
impl Freeze for RpcErrorCode
impl RefUnwindSafe for RpcErrorCode
impl Send for RpcErrorCode
impl Sync for RpcErrorCode
impl Unpin for RpcErrorCode
impl UnsafeUnpin for RpcErrorCode
impl UnwindSafe for RpcErrorCode
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