pub struct SwapProvider {
pub id: String,
pub name: String,
pub protocols: Vec<SwapProviderProtocolsEnum>,
pub category: ProviderCategoryEnum,
pub is_terms_approval_required: bool,
pub terms_of_service_url: Option<String>,
pub is_terms_of_service_approved: Option<bool>,
}
Fields§
§id: String
The ID of the provider
name: String
Name of the provider
protocols: Vec<SwapProviderProtocolsEnum>
List of supported protocols. Protocols are specific per provider
category: ProviderCategoryEnum
§is_terms_approval_required: bool
Indicates whether the terms of service are required for the provider. if
true
, the user must approve the terms of service before using the
provider. otherwise, termsOfServiceUrl
and isTermsOfServiceApproved
are not shown under the provider data.
terms_of_service_url: Option<String>
URL to the terms of service
is_terms_of_service_approved: Option<bool>
Indicates whether the terms of service are approved by the user
Implementations§
Source§impl SwapProvider
impl SwapProvider
pub fn new( id: String, name: String, protocols: Vec<SwapProviderProtocolsEnum>, category: ProviderCategoryEnum, is_terms_approval_required: bool, ) -> SwapProvider
Trait Implementations§
Source§impl Clone for SwapProvider
impl Clone for SwapProvider
Source§fn clone(&self) -> SwapProvider
fn clone(&self) -> SwapProvider
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 SwapProvider
impl Debug for SwapProvider
Source§impl Default for SwapProvider
impl Default for SwapProvider
Source§fn default() -> SwapProvider
fn default() -> SwapProvider
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SwapProvider
impl<'de> Deserialize<'de> for SwapProvider
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 PartialEq for SwapProvider
impl PartialEq for SwapProvider
Source§impl Serialize for SwapProvider
impl Serialize for SwapProvider
impl StructuralPartialEq for SwapProvider
Auto Trait Implementations§
impl Freeze for SwapProvider
impl RefUnwindSafe for SwapProvider
impl Send for SwapProvider
impl Sync for SwapProvider
impl Unpin for SwapProvider
impl UnwindSafe for SwapProvider
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