[][src]Trait scroll::ctx::MeasureWith

pub trait MeasureWith<Ctx> {
    type Units;
    fn measure_with(&self, ctx: &Ctx) -> Self::Units;
}

A trait for measuring how large something is; for a byte sequence, it will be its length.

Associated Types

type Units

Loading content...

Required methods

fn measure_with(&self, ctx: &Ctx) -> Self::Units

How large is Self, given the ctx?

Loading content...

Implementations on Foreign Types

impl<Ctx> MeasureWith<Ctx> for [u8][src]

type Units = usize

Loading content...

Implementors

impl<Ctx, T: AsRef<[u8]>> MeasureWith<Ctx> for T[src]

type Units = usize

Loading content...