Trait scroll::ctx::MeasureWith

source ·
pub trait MeasureWith<Ctx> {
    // Required method
    fn measure_with(&self, ctx: &Ctx) -> usize;
}
Expand description

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

Required Methods§

source

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

How large is Self, given the ctx?

Implementations on Foreign Types§

source§

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

source§

fn measure_with(&self, _ctx: &Ctx) -> usize

Implementors§

source§

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