pub struct BridgeExit {
pub leaf_type: LeafType,
pub token_info: TokenInfo,
pub dest_network: NetworkId,
pub dest_address: Address,
pub amount: Uint<256, 4>,
pub metadata: Option<Digest>,
}Expand description
Represents a token bridge exit from the network.
Fields§
§leaf_type: LeafType§token_info: TokenInfoUnique ID for the token being transferred.
dest_network: NetworkIdNetwork which the token is transferred to
dest_address: AddressAddress which will own the received token
amount: Uint<256, 4>Token amount sent
metadata: Option<Digest>Implementations§
Source§impl BridgeExit
impl BridgeExit
Sourcepub fn new(
leaf_type: LeafType,
origin_network: NetworkId,
origin_token_address: Address,
dest_network: NetworkId,
dest_address: Address,
amount: Uint<256, 4>,
metadata: Vec<u8>,
) -> BridgeExit
pub fn new( leaf_type: LeafType, origin_network: NetworkId, origin_token_address: Address, dest_network: NetworkId, dest_address: Address, amount: Uint<256, 4>, metadata: Vec<u8>, ) -> BridgeExit
Creates a new BridgeExit.
pub fn is_transfer(&self) -> bool
Source§impl BridgeExit
impl BridgeExit
pub fn is_message(&self) -> bool
Sourcepub fn amount_token_info(&self) -> TokenInfo
pub fn amount_token_info(&self) -> TokenInfo
Returns the TokenInfo considered for the the given amount.
The amount corresponds to L1 ETH if the bridge exit is a message.
Trait Implementations§
Source§impl Clone for BridgeExit
impl Clone for BridgeExit
Source§fn clone(&self) -> BridgeExit
fn clone(&self) -> BridgeExit
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 BridgeExit
impl Debug for BridgeExit
Source§impl<'de> Deserialize<'de> for BridgeExit
impl<'de> Deserialize<'de> for BridgeExit
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BridgeExit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BridgeExit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BridgeExit
impl PartialEq for BridgeExit
Source§fn eq(&self, other: &BridgeExit) -> bool
fn eq(&self, other: &BridgeExit) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BridgeExit
impl Serialize for BridgeExit
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for BridgeExit
impl StructuralPartialEq for BridgeExit
Auto Trait Implementations§
impl Freeze for BridgeExit
impl RefUnwindSafe for BridgeExit
impl Send for BridgeExit
impl Sync for BridgeExit
impl Unpin for BridgeExit
impl UnsafeUnpin for BridgeExit
impl UnwindSafe for BridgeExit
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