Enum jsonrpsee_types::params::Id
source · Expand description
Request Id
Variants§
Implementations§
source§impl<'a> Id<'a>
impl<'a> Id<'a>
sourcepub fn as_number(&self) -> Option<&u64>
pub fn as_number(&self) -> Option<&u64>
If the Id is a number, returns the associated number. Returns None otherwise.
sourcepub fn as_str(&self) -> Option<&str>
pub fn as_str(&self) -> Option<&str>
If the Id is a String, returns the associated str. Returns None otherwise.
sourcepub fn into_owned(self) -> Id<'static>
pub fn into_owned(self) -> Id<'static>
Convert Id<'a>
to Id<'static>
so that it can be moved across threads.
This can cause an allocation if the id is a string.
Trait Implementations§
source§impl<'de: 'a, 'a> Deserialize<'de> for Id<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Id<'a>
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
source§impl<'a> Ord for Id<'a>
impl<'a> Ord for Id<'a>
source§impl<'a> PartialOrd<Id<'a>> for Id<'a>
impl<'a> PartialOrd<Id<'a>> for Id<'a>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more