pub trait Tokenizable {
// Required methods
fn from_token(token: Token) -> Result<Self>
where Self: Sized;
fn into_token(self) -> Token;
}
Required Methods§
Sourcefn from_token(token: Token) -> Result<Self>where
Self: Sized,
fn from_token(token: Token) -> Result<Self>where
Self: Sized,
Converts a Token
into expected type.
Sourcefn into_token(self) -> Token
fn into_token(self) -> Token
Converts a specified type back into token.