pub struct CosmosAddr { /* private fields */ }Expand description
Cosmos address
Implementations§
Source§impl CosmosAddr
impl CosmosAddr
pub fn new_unchecked(value: impl ToString, prefix_len: usize) -> CosmosAddr
pub fn new_bytes(bytes: Vec<u8>, prefix: &str) -> Result<CosmosAddr, Error>
Sourcepub fn new_pub_key(
pub_key: &PublicKey,
prefix: &str,
) -> Result<CosmosAddr, Error>
pub fn new_pub_key( pub_key: &PublicKey, prefix: &str, ) -> Result<CosmosAddr, Error>
if you just have a string address, use new_cosmos_string instead
pub fn new_str(value: &str, prefix: Option<&str>) -> Result<CosmosAddr, Error>
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn prefix(&self) -> &str
pub fn change_prefix(&self, new_prefix: &str) -> Result<CosmosAddr, Error>
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for CosmosAddr
impl<'__de, __Context> BorrowDecode<'__de, __Context> for CosmosAddr
Source§fn borrow_decode<__D>(decoder: &mut __D) -> Result<CosmosAddr, DecodeError>where
__D: BorrowDecoder<'__de, Context = __Context>,
fn borrow_decode<__D>(decoder: &mut __D) -> Result<CosmosAddr, DecodeError>where
__D: BorrowDecoder<'__de, Context = __Context>,
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for CosmosAddr
impl Clone for CosmosAddr
Source§fn clone(&self) -> CosmosAddr
fn clone(&self) -> CosmosAddr
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 CosmosAddr
impl Debug for CosmosAddr
Source§impl<__Context> Decode<__Context> for CosmosAddr
impl<__Context> Decode<__Context> for CosmosAddr
Source§fn decode<__D>(decoder: &mut __D) -> Result<CosmosAddr, DecodeError>where
__D: Decoder<Context = __Context>,
fn decode<__D>(decoder: &mut __D) -> Result<CosmosAddr, DecodeError>where
__D: Decoder<Context = __Context>,
Attempt to decode this type with the given Decode.
Source§impl<'de> Deserialize<'de> for CosmosAddr
impl<'de> Deserialize<'de> for CosmosAddr
Source§fn deserialize<D>(
deserializer: D,
) -> Result<CosmosAddr, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<CosmosAddr, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CosmosAddr
impl Display for CosmosAddr
Source§impl Encode for CosmosAddr
impl Encode for CosmosAddr
Source§impl From<CosmosAddr> for Address
impl From<CosmosAddr> for Address
Source§fn from(addr: CosmosAddr) -> Address
fn from(addr: CosmosAddr) -> Address
Converts to this type from the input type.
Source§impl FromStr for CosmosAddr
impl FromStr for CosmosAddr
Source§impl Hash for CosmosAddr
impl Hash for CosmosAddr
Source§impl JsonSchema for CosmosAddr
impl JsonSchema for CosmosAddr
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(_generator: &mut SchemaGenerator) -> Schema
fn json_schema(_generator: &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 Ord for CosmosAddr
impl Ord for CosmosAddr
Source§fn cmp(&self, other: &CosmosAddr) -> Ordering
fn cmp(&self, other: &CosmosAddr) -> 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 CosmosAddr
impl PartialEq for CosmosAddr
Source§impl PartialOrd for CosmosAddr
impl PartialOrd for CosmosAddr
Source§impl Schemaifier for CosmosAddr
impl Schemaifier for CosmosAddr
fn visit_schema(visitor: &mut SchemaVisitor) -> usize
fn id() -> Identifier
Source§impl Serialize for CosmosAddr
impl Serialize for CosmosAddr
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<&Addr> for CosmosAddr
impl TryFrom<&Addr> for CosmosAddr
Source§impl TryFrom<Addr> for CosmosAddr
impl TryFrom<Addr> for CosmosAddr
Source§impl TryFrom<Address> for CosmosAddr
impl TryFrom<Address> for CosmosAddr
impl Eq for CosmosAddr
impl StructuralPartialEq for CosmosAddr
Auto Trait Implementations§
impl Freeze for CosmosAddr
impl RefUnwindSafe for CosmosAddr
impl Send for CosmosAddr
impl Sync for CosmosAddr
impl Unpin for CosmosAddr
impl UnwindSafe for CosmosAddr
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.