pub struct InsertName { /* private fields */ }Expand description
A name used as a key when inserting a type into a crate::TypeRegistry.
§Example
use scale_info_legacy::InsertName;
// Names can be plain identifiers:
InsertName::parse("Foo").unwrap();
// Or they can have generic parameters which
// will be resolved during lookup:
InsertName::parse("Bar<A,B>").unwrap();Implementations§
Source§impl InsertName
impl InsertName
Sourcepub fn parse(s: &str) -> Result<Self, ParseError>
pub fn parse(s: &str) -> Result<Self, ParseError>
Parse a string into an InsertName.
Sourcepub fn in_pallet(self, pallet_name: impl Into<String>) -> InsertName
pub fn in_pallet(self, pallet_name: impl Into<String>) -> InsertName
Scope the inserted type to being within the given pallet. Only lookups that are also performed within this pallet will make use of this type.
Trait Implementations§
Source§impl Clone for InsertName
impl Clone for InsertName
Source§fn clone(&self) -> InsertName
fn clone(&self) -> InsertName
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 InsertName
impl Debug for InsertName
Source§impl<'de> Deserialize<'de> for InsertName
impl<'de> Deserialize<'de> for InsertName
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 Display for InsertName
impl Display for InsertName
Source§impl From<InsertName> for LookupName
impl From<InsertName> for LookupName
Source§fn from(value: InsertName) -> Self
fn from(value: InsertName) -> Self
Converts to this type from the input type.
Source§impl FromStr for InsertName
impl FromStr for InsertName
Source§impl Hash for InsertName
impl Hash for InsertName
Source§impl Ord for InsertName
impl Ord for InsertName
Source§fn cmp(&self, other: &InsertName) -> Ordering
fn cmp(&self, other: &InsertName) -> 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 InsertName
impl PartialEq for InsertName
Source§impl PartialOrd for InsertName
impl PartialOrd for InsertName
Source§impl Serialize for InsertName
impl Serialize for InsertName
Source§impl TryFrom<&str> for InsertName
impl TryFrom<&str> for InsertName
Source§impl TryFrom<LookupName> for InsertName
impl TryFrom<LookupName> for InsertName
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for InsertName
impl TryFrom<String> for InsertName
impl Eq for InsertName
impl StructuralPartialEq for InsertName
Auto Trait Implementations§
impl Freeze for InsertName
impl RefUnwindSafe for InsertName
impl Send for InsertName
impl Sync for InsertName
impl Unpin for InsertName
impl UnwindSafe for InsertName
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.