pub struct RpcMethodName(/* private fields */);Implementations§
Source§impl RpcMethodName
impl RpcMethodName
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 RpcMethodName
impl AsRef<str> for RpcMethodName
Source§impl Clone for RpcMethodName
impl Clone for RpcMethodName
Source§fn clone(&self) -> RpcMethodName
fn clone(&self) -> RpcMethodName
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 RpcMethodName
impl Debug for RpcMethodName
Source§impl Display for RpcMethodName
impl Display for RpcMethodName
Source§impl FromStr for RpcMethodName
impl FromStr for RpcMethodName
Source§impl Hash for RpcMethodName
impl Hash for RpcMethodName
Source§impl Ord for RpcMethodName
impl Ord for RpcMethodName
Source§fn cmp(&self, other: &RpcMethodName) -> Ordering
fn cmp(&self, other: &RpcMethodName) -> Ordering
1.21.0 (const: unstable) · 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 RpcMethodName
impl PartialEq for RpcMethodName
Source§fn eq(&self, other: &RpcMethodName) -> bool
fn eq(&self, other: &RpcMethodName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RpcMethodName
impl PartialOrd for RpcMethodName
Source§impl TryFrom<&str> for RpcMethodName
impl TryFrom<&str> for RpcMethodName
impl Eq for RpcMethodName
impl StructuralPartialEq for RpcMethodName
Auto Trait Implementations§
impl Freeze for RpcMethodName
impl RefUnwindSafe for RpcMethodName
impl Send for RpcMethodName
impl Sync for RpcMethodName
impl Unpin for RpcMethodName
impl UnsafeUnpin for RpcMethodName
impl UnwindSafe for RpcMethodName
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