Struct abstract_std::objects::chain_name::ChainName
source · pub struct ChainName(/* private fields */);Expand description
The name of a chain, aka the chain-id without the post-fix number.
ex. cosmoshub-4 -> cosmoshub, juno-1 -> juno
Implementations§
source§impl ChainName
impl ChainName
pub fn new(env: &Env) -> Self
pub fn from_chain_id(chain_id: &str) -> Self
pub fn from_string(value: String) -> AbstractResult<Self>
sourcepub fn verify(&self) -> AbstractResult<()>
pub fn verify(&self) -> AbstractResult<()>
verify the formatting of the chain name
pub fn as_str(&self) -> &str
pub fn into_string(self) -> String
Trait Implementations§
source§impl<'de> Deserialize<'de> for ChainName
impl<'de> Deserialize<'de> for ChainName
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 FromStr for ChainName
impl FromStr for ChainName
§type Err = AbstractError
type Err = AbstractError
The associated error which can be returned from parsing.
source§impl JsonSchema for ChainName
impl JsonSchema for ChainName
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moresource§impl KeyDeserialize for &ChainName
impl KeyDeserialize for &ChainName
source§impl Ord for ChainName
impl Ord for ChainName
source§impl PartialEq for ChainName
impl PartialEq for ChainName
source§impl PartialOrd for ChainName
impl PartialOrd for ChainName
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 moresource§impl<'a> PrimaryKey<'a> for &ChainName
impl<'a> PrimaryKey<'a> for &ChainName
§type Prefix = ()
type Prefix = ()
These associated types need to implement
Prefixer, so that they can be useful arguments
for prefix(), sub_prefix(), and their key-deserializable variants.type SubPrefix = ()
§type Suffix = &ChainName
type Suffix = &ChainName
These associated types need to implement
KeyDeserialize, so that they can be returned from
range_de() and friends.type SuperSuffix = &ChainName
fn joined_key(&self) -> Vec<u8>
fn joined_extra_key(&self, key: &[u8]) -> Vec<u8>
impl Eq for ChainName
impl StructuralPartialEq for ChainName
Auto Trait Implementations§
impl Freeze for ChainName
impl RefUnwindSafe for ChainName
impl Send for ChainName
impl Sync for ChainName
impl Unpin for ChainName
impl UnwindSafe for ChainName
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more