pub struct ApprovalContract {
pub id: String,
pub feature: ApprovalFeature,
pub token: String,
pub spender: String,
pub standard: ApprovalStandard,
pub amount: Option<Allowance>,
pub approved: bool,
}Expand description
Approval state for one token and spender pair.
Fields§
§id: StringStable identifier for the pair, such as UsdcExchange.
feature: ApprovalFeatureWhat the approval unlocks.
token: StringToken contract address.
spender: StringSpender contract address.
standard: ApprovalStandardToken standard.
amount: Option<Allowance>Allowance for ERC20 entries. Always None for ERC1155, which is an
operator flag with no amount — read approved instead.
approved: boolWhether the approval is sufficient for its feature.
Trait Implementations§
Source§impl Clone for ApprovalContract
impl Clone for ApprovalContract
Source§fn clone(&self) -> ApprovalContract
fn clone(&self) -> ApprovalContract
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ApprovalContract
impl Debug for ApprovalContract
Source§impl<'de> Deserialize<'de> for ApprovalContract
impl<'de> Deserialize<'de> for ApprovalContract
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
Auto Trait Implementations§
impl Freeze for ApprovalContract
impl RefUnwindSafe for ApprovalContract
impl Send for ApprovalContract
impl Sync for ApprovalContract
impl Unpin for ApprovalContract
impl UnsafeUnpin for ApprovalContract
impl UnwindSafe for ApprovalContract
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