Trait GetSize

Source
pub trait GetSize {
    // Required method
    fn get_size(&self) -> usize;
}
Expand description

GetSize is a trait defining a single function that calculates the total size of an encodable type.

Required Methods§

Source

fn get_size(&self) -> usize

get_size returns total size of the type in bytes.

Implementations on Foreign Types§

Source§

impl GetSize for Vec<u8>

Vec is used as the Sv2 type Bytes

Source§

fn get_size(&self) -> usize

Source§

impl GetSize for Slice

Source§

fn get_size(&self) -> usize

Implementors§

Source§

impl GetSize for EncodablePrimitive<'_>

Source§

impl GetSize for EncodableField<'_>

Source§

impl<T> GetSize for Seq0255<'_, T>
where T: GetSize,

Source§

impl<T> GetSize for Seq064K<'_, T>
where T: GetSize,

Source§

impl<T> GetSize for Sv2Option<'_, T>
where T: GetSize,

Source§

impl<T> GetSize for T
where T: Fixed,