pub struct Address {
pub address: Option<BytesData>,
pub address_type: i32,
pub currency: i32,
}Fields§
§address: Option<BytesData>§address_type: i32§currency: i32Implementations§
Source§impl Address
impl Address
Sourcepub fn address_type(&self) -> AddressType
pub fn address_type(&self) -> AddressType
Returns the enum value of address_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_address_type(&mut self, value: AddressType)
pub fn set_address_type(&mut self, value: AddressType)
Sets address_type to the provided enum value.
Sourcepub fn currency(&self) -> SupportedCurrency
pub fn currency(&self) -> SupportedCurrency
Returns the enum value of currency, or the default if the field is set to an invalid enum value.
Sourcepub fn set_currency(&mut self, value: SupportedCurrency)
pub fn set_currency(&mut self, value: SupportedCurrency)
Sets currency to the provided enum value.
Source§impl Address
impl Address
pub fn from_multisig_public_keys_and_threshold( public_keys: &Vec<PublicKey>, threshold: i64, ) -> Address
pub fn mark_bitcoin_external(&mut self) -> &mut Self
pub fn mark_ethereum_external(&mut self) -> &mut Self
pub fn mark_external(&mut self) -> &mut Self
pub fn as_external(&self) -> Address
pub fn as_internal(&self) -> Address
pub fn script_hash(input: impl AsRef<[u8]>) -> RgResult<Self>
pub fn from_bitcoin_external(address: &String) -> Address
pub fn from_bitcoin(address: &String) -> Address
pub fn from_eth_direct(address: impl Into<String>) -> Address
pub fn from_monero(address: &String) -> Address
pub fn from_solana(address: &String) -> Address
pub fn from_type(address: &String, t: AddressType) -> Address
pub fn from_monero_external(address: impl AsRef<str>) -> Address
pub fn from_solana_external(address: &String) -> Address
pub fn from_eth_external_exact(address: impl Into<String>) -> Address
pub fn is_bitcoin(&self) -> bool
pub fn address_typed(&self) -> RgResult<AddressType>
pub fn raw_bytes(&self) -> RgResult<Vec<u8>>
pub fn external_string_address(&self) -> RgResult<String>
pub fn render_string(&self) -> Result<String, ErrorInfo>
pub fn from_bytes(bytes: Vec<u8>) -> Result<Address, ErrorInfo>
pub fn from_byte_calculate(vec: &Vec<u8>) -> Result<Address, ErrorInfo>
pub fn from_struct_public(pk: &PublicKey) -> Result<Address, ErrorInfo>
pub fn with_checksum(bytes: Vec<u8>) -> Vec<u8> ⓘ
pub fn verify_length(&self) -> Result<(), ErrorInfo>
pub fn verify_checksum(&self) -> Result<(), ErrorInfo>
pub fn validated(self) -> RgResult<Self>
pub fn str_to_address(s: String) -> Vec<u8> ⓘ
pub fn address_to_str(a: &Vec<u8>) -> String
pub fn address_data(address: Vec<u8>) -> Option<Address>
pub fn new_raw(address: Vec<u8>) -> Address
pub fn raw_from_hex(hex: impl Into<String>) -> RgResult<Address>
pub fn currency_or(&self) -> SupportedCurrency
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
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 Message for Address
impl Message for Address
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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> 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<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 more