Struct deep_space::address::Address [−][src]
An address that’s derived from a given PublicKey
Implementations
impl Address[src]
pub const DEFAULT_PREFIX: &'static str[src]
In cases where it’s impossible to know the Bech32 prefix we fall back to this value
pub fn from_slice<T: Into<String>>(
bytes: &[u8],
prefix: T
) -> Result<Address, AddressError>[src]
bytes: &[u8],
prefix: T
) -> Result<Address, AddressError>
pub fn from_bytes<T: Into<String>>(
bytes: [u8; 20],
prefix: T
) -> Result<Address, AddressError>[src]
bytes: [u8; 20],
prefix: T
) -> Result<Address, AddressError>
pub fn as_bytes(&self) -> &[u8][src]
Returns bytes of a given Address as a slice of bytes
pub fn to_vec(&self) -> Vec<u8>[src]
pub fn get_prefix(&self) -> String[src]
pub fn change_prefix<T: Into<String>>(
&mut self,
prefix: T
) -> Result<(), AddressError>[src]
&mut self,
prefix: T
) -> Result<(), AddressError>
pub fn to_bech32<T: Into<String>>(&self, hrp: T) -> Result<String, AddressError>[src]
Obtain a bech32 encoded address with a given prefix.
hrp- A prefix for bech32 encoding. The convention for addresses in Cosmos iscosmos. note this does not update the prefix stored in the address
pub fn from_bech32(s: String) -> Result<Address, AddressError>[src]
Parse a bech32 encoded address
s- A bech32 encoded address
Trait Implementations
impl Clone for Address[src]
impl Copy for Address[src]
impl Debug for Address[src]
impl<'de> Deserialize<'de> for Address[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Display for Address[src]
impl Eq for Address[src]
impl FromStr for Address[src]
type Err = AddressError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>[src]
impl Hash for Address[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<Address> for Address[src]
impl Serialize for Address[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl StructuralEq for Address[src]
impl StructuralPartialEq for Address[src]
Auto Trait Implementations
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> IntoRequest<T> for T[src]
pub fn into_request(self) -> Request<T>[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>, [src]
S: Into<Dispatch>,