Enum jet_margin::TokenKind
source · [−]#[repr(u32)]
pub enum TokenKind {
Collateral,
Claim,
AdapterCollateral,
}
Expand description
Description of the token’s usage
Variants
Collateral
The token can be used as collateral
Claim
The token represents a debt that needs to be repaid
AdapterCollateral
The token balance is managed by a trusted adapter to represent the amount of collateral custodied by that adapter. The token account is owned by the adapter. Collateral is accessed through instructions to the adapter.
Trait Implementations
sourceimpl BorshDeserialize for TokenKind
impl BorshDeserialize for TokenKind
sourcefn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
sourceimpl Contiguous for TokenKind
impl Contiguous for TokenKind
fn from_integer(value: Self::Int) -> Option<Self>
fn from_integer(value: Self::Int) -> Option<Self>
If
value
is within the range for valid instances of this type,
returns Some(converted_value)
, otherwise, returns None
. Read morefn into_integer(self) -> Self::Int
fn into_integer(self) -> Self::Int
Perform the conversion from
C
into the underlying integral type. This
mostly exists otherwise generic code would need unsafe for the value as integer
Read moreimpl Copy for TokenKind
impl Eq for TokenKind
impl StructuralEq for TokenKind
impl StructuralPartialEq for TokenKind
Auto Trait Implementations
impl RefUnwindSafe for TokenKind
impl Send for TokenKind
impl Sync for TokenKind
impl Unpin for TokenKind
impl UnwindSafe for TokenKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more