pub trait Descriptor {
// Required methods
fn size(&self) -> usize;
fn write_to_unchecked(&self, buf: &[Cell<u8>]) -> usize;
// Provided method
fn write_to(&self, buf: &[Cell<u8>]) -> usize { ... }
}
Required Methods§
Sourcefn write_to_unchecked(&self, buf: &[Cell<u8>]) -> usize
fn write_to_unchecked(&self, buf: &[Cell<u8>]) -> usize
Same as write_to()
, but doesn’t check that buf
is long enough
before indexing into it. This should be used only if the result
of size()
is first consulted.