[−][src]Enum nash_protocol::types::blockchain::AssetOrCrosschain
An asset in the Ethereum and NEO smart contract protocols is represented either by an asset id or an indicator that the trade is occurring across blockchains.
Variants
Asset(Asset)Implementations
impl AssetOrCrosschain[src]
pub fn to_eth_bytes(&self) -> [u8; 2][src]
Convert asset to id in bytes interpretable by the Ethereum
smart contract, or 0xffff if it is a cross-chain asset
pub fn from_eth_bytes(bytes: [u8; 2]) -> Result<Self>[src]
Read asset bytes from a protocol payload and convert into an Asset or mark as cross-chain
impl AssetOrCrosschain[src]
pub fn to_neo_bytes(&self) -> Vec<u8>[src]
Convert asset to id in bytes interpretable by the NEO
smart contract, or 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF if it is a cross-chain asset
pub fn from_neo_bytes(bytes: Vec<u8>) -> Result<Self>[src]
Read asset bytes from a protocol payload and convert into an Asset or mark as cross-chain
Trait Implementations
impl Clone for AssetOrCrosschain[src]
pub fn clone(&self) -> AssetOrCrosschain[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for AssetOrCrosschain[src]
impl From<Asset> for AssetOrCrosschain[src]
impl From<AssetofPrecision> for AssetOrCrosschain[src]
pub fn from(asset_prec: AssetofPrecision) -> Self[src]
impl PartialEq<AssetOrCrosschain> for AssetOrCrosschain[src]
pub fn eq(&self, other: &AssetOrCrosschain) -> bool[src]
pub fn ne(&self, other: &AssetOrCrosschain) -> bool[src]
impl StructuralPartialEq for AssetOrCrosschain[src]
Auto Trait Implementations
impl RefUnwindSafe for AssetOrCrosschain
impl Send for AssetOrCrosschain
impl Sync for AssetOrCrosschain
impl Unpin for AssetOrCrosschain
impl UnwindSafe for AssetOrCrosschain
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,