fuels_core::traits

Trait Tokenizable

Source
pub trait Tokenizable {
    // Required methods
    fn from_token(token: Token) -> Result<Self>
       where Self: Sized;
    fn into_token(self) -> Token;
}

Required Methods§

Source

fn from_token(token: Token) -> Result<Self>
where Self: Sized,

Converts a Token into expected type.

Source

fn into_token(self) -> Token

Converts a specified type back into token.

Implementations on Foreign Types§

Source§

impl Tokenizable for bool

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl Tokenizable for u8

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl Tokenizable for u16

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl Tokenizable for u32

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl Tokenizable for u64

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl Tokenizable for u128

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl Tokenizable for ()

Source§

fn from_token(token: Token) -> Result<Self>
where Self: Sized,

Source§

fn into_token(self) -> Token

Source§

impl Tokenizable for String

Source§

fn from_token(token: Token) -> Result<Self>
where Self: Sized,

Source§

fn into_token(self) -> Token

Source§

impl<A> Tokenizable for (A,)
where A: Tokenizable,

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B> Tokenizable for (A, B)
where A: Tokenizable, B: Tokenizable,

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C> Tokenizable for (A, B, C)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D> Tokenizable for (A, B, C, D)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E> Tokenizable for (A, B, C, D, E)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F> Tokenizable for (A, B, C, D, E, F)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G> Tokenizable for (A, B, C, D, E, F, G)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G, H> Tokenizable for (A, B, C, D, E, F, G, H)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G, H, I> Tokenizable for (A, B, C, D, E, F, G, H, I)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G, H, I, J> Tokenizable for (A, B, C, D, E, F, G, H, I, J)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> Tokenizable for (A, B, C, D, E, F, G, H, I, J, K)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> Tokenizable for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> Tokenizable for (A, B, C, D, E, F, G, H, I, J, K, L, M)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> Tokenizable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> Tokenizable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Tokenizable for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<T> Tokenizable for Option<T>

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<T, E> Tokenizable for Result<T, E>

Source§

fn from_token(token: Token) -> Result<Self>

Source§

fn into_token(self) -> Token

Source§

impl<T: Tokenizable> Tokenizable for Vec<T>

Source§

fn from_token(token: Token) -> Result<Self>
where Self: Sized,

Source§

fn into_token(self) -> Token

Source§

impl<const SIZE: usize, T: Tokenizable> Tokenizable for [T; SIZE]

Source§

fn from_token(token: Token) -> Result<Self>
where Self: Sized,

Source§

fn into_token(self) -> Token

Implementors§