Enum clarity::abi::SerializedToken
source · pub enum SerializedToken {
Static([u8; 32]),
Dynamic(Vec<u8>),
}
Expand description
Representation of a serialized token.
Serialization occurs once a list of tokens is passed. After that the library will determine the actual ABI encoding of a each type wrapped in a token, and then it will return a SerializedToken::Static, or SerializedToken::Dynamic depending on encoding rules used for a given type.
With a list of values of type SerializedToken
a caller can construct a final
binary data that will represent a valid ABI encoding of function parameters.
Variants§
Static([u8; 32])
This data can be safely appended to the output stream
Dynamic(Vec<u8>)
This data should be saved up in a buffer, and an offset should be appended to the output stream instead.
Auto Trait Implementations§
impl Freeze for SerializedToken
impl RefUnwindSafe for SerializedToken
impl Send for SerializedToken
impl Sync for SerializedToken
impl Unpin for SerializedToken
impl UnwindSafe for SerializedToken
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