Trait read_fonts::VarSize

source ·
pub trait VarSize {
    type Size: Scalar + Into<u32>;
}
Expand description

A trait for types that have variable length.

As a rule, these types have an initial length field.

For types with a constant size, see FixedSize and for types which can pre-compute their size, see ComputeSize.

Required Associated Types§

source

type Size: Scalar + Into<u32>

The type of the first (length) field of the item.

When reading this type, we will read this value first, and use it to determine the total length.

Object Safety§

This trait is not object safe.

Implementors§