Struct CosmosAddr
pub struct CosmosAddr { /* private fields */ }Expand description
Cosmos address
Implementations§
§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>
pub 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§
§impl<'__de, __Context> BorrowDecode<'__de, __Context> for CosmosAddr
impl<'__de, __Context> BorrowDecode<'__de, __Context> for CosmosAddr
§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.
§impl Clone for CosmosAddr
impl Clone for CosmosAddr
§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 more§impl Debug for CosmosAddr
impl Debug for CosmosAddr
§impl<__Context> Decode<__Context> for CosmosAddr
impl<__Context> Decode<__Context> for CosmosAddr
§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.
§impl<'de> Deserialize<'de> for CosmosAddr
impl<'de> Deserialize<'de> for CosmosAddr
§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
§impl Display for CosmosAddr
impl Display for CosmosAddr
§impl Encode for CosmosAddr
impl Encode for CosmosAddr
§impl From<CosmosAddr> for Address
impl From<CosmosAddr> for Address
§fn from(addr: CosmosAddr) -> Address
fn from(addr: CosmosAddr) -> Address
Converts to this type from the input type.
§impl FromStr for CosmosAddr
impl FromStr for CosmosAddr
§impl Hash for CosmosAddr
impl Hash for CosmosAddr
§impl JsonSchema for CosmosAddr
impl JsonSchema for CosmosAddr
§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
§fn json_schema(_generator: &mut SchemaGenerator) -> Schema
fn json_schema(_generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§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 more§impl Ord for CosmosAddr
impl Ord for CosmosAddr
§impl PartialEq for CosmosAddr
impl PartialEq for CosmosAddr
§impl PartialOrd for CosmosAddr
impl PartialOrd for CosmosAddr
§impl Schemaifier for CosmosAddr
impl Schemaifier for CosmosAddr
fn visit_schema(visitor: &mut SchemaVisitor) -> usize
fn id() -> Identifier
§impl Serialize for CosmosAddr
impl Serialize for CosmosAddr
§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
§impl TryFrom<&Addr> for CosmosAddr
impl TryFrom<&Addr> for CosmosAddr
§impl TryFrom<Addr> for CosmosAddr
impl TryFrom<Addr> for CosmosAddr
§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§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.