pub struct CurrencyInfo {
pub coin_type: String,
pub currency: String,
pub currency_long: String,
pub fee_precision: i32,
pub min_confirmations: i32,
pub min_withdrawal_fee: f64,
pub withdrawal_fee: f64,
pub withdrawal_priorities: Vec<WithdrawalPriority>,
pub disabled: Option<bool>,
pub min_deposit_amount: Option<f64>,
pub max_withdrawal_amount: Option<f64>,
}Expand description
Currency information and configuration
Fields§
§coin_type: StringCoin type identifier (e.g., “BITCOIN”, “ETHEREUM”)
currency: StringCurrency code
currency_long: StringFull currency name
fee_precision: i32Fee precision (decimal places)
min_confirmations: i32Minimum confirmations required
min_withdrawal_fee: f64Minimum withdrawal fee
withdrawal_fee: f64Standard withdrawal fee
withdrawal_priorities: Vec<WithdrawalPriority>Available withdrawal priorities
disabled: Option<bool>Whether the currency is disabled
min_deposit_amount: Option<f64>Minimum deposit amount
max_withdrawal_amount: Option<f64>Maximum withdrawal amount
Implementations§
Source§impl CurrencyInfo
impl CurrencyInfo
Sourcepub fn new(
coin_type: String,
currency: String,
currency_long: String,
fee_precision: i32,
min_confirmations: i32,
min_withdrawal_fee: f64,
withdrawal_fee: f64,
) -> Self
pub fn new( coin_type: String, currency: String, currency_long: String, fee_precision: i32, min_confirmations: i32, min_withdrawal_fee: f64, withdrawal_fee: f64, ) -> Self
Create new currency info
Sourcepub fn add_priority(&mut self, priority: WithdrawalPriority)
pub fn add_priority(&mut self, priority: WithdrawalPriority)
Add withdrawal priority
Sourcepub fn with_disabled(self, disabled: bool) -> Self
pub fn with_disabled(self, disabled: bool) -> Self
Set disabled status
Sourcepub fn with_deposit_limit(self, min_amount: f64) -> Self
pub fn with_deposit_limit(self, min_amount: f64) -> Self
Set deposit limits
Sourcepub fn with_withdrawal_limit(self, max_amount: f64) -> Self
pub fn with_withdrawal_limit(self, max_amount: f64) -> Self
Set withdrawal limits
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if currency is enabled
Sourcepub fn get_priority(&self, name: &str) -> Option<&WithdrawalPriority>
pub fn get_priority(&self, name: &str) -> Option<&WithdrawalPriority>
Get priority by name
Sourcepub fn highest_priority(&self) -> Option<&WithdrawalPriority>
pub fn highest_priority(&self) -> Option<&WithdrawalPriority>
Get highest priority
Sourcepub fn lowest_priority(&self) -> Option<&WithdrawalPriority>
pub fn lowest_priority(&self) -> Option<&WithdrawalPriority>
Get lowest priority
Trait Implementations§
Source§impl Clone for CurrencyInfo
impl Clone for CurrencyInfo
Source§fn clone(&self) -> CurrencyInfo
fn clone(&self) -> CurrencyInfo
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 CurrencyInfo
impl Debug for CurrencyInfo
Source§impl<'de> Deserialize<'de> for CurrencyInfo
impl<'de> Deserialize<'de> for CurrencyInfo
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 Display for CurrencyInfo
impl Display for CurrencyInfo
Source§impl PartialEq for CurrencyInfo
impl PartialEq for CurrencyInfo
Source§impl Serialize for CurrencyInfo
impl Serialize for CurrencyInfo
impl StructuralPartialEq for CurrencyInfo
Auto Trait Implementations§
impl Freeze for CurrencyInfo
impl RefUnwindSafe for CurrencyInfo
impl Send for CurrencyInfo
impl Sync for CurrencyInfo
impl Unpin for CurrencyInfo
impl UnwindSafe for CurrencyInfo
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<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> 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.