read_fonts

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§