Skip to main content

Context

Trait Context 

Source
pub trait Context {
    type Phase: Phase;

    // Required methods
    fn slice<'a>(&'a self, bytes: &'a <Self::Phase as Phase>::Bytes) -> &'a [u8] ;
    fn function(&self, index: usize) -> Option<&Func<Self::Phase>>;
    fn pack(&self, index: usize) -> Option<impl Iterator<Item = Arg>>;
    fn unpack_arity(&self, index: usize) -> Option<usize>;
    fn symbol_valid(&self, index: usize) -> bool;
    fn constant_valid(&self, index: usize) -> bool;
}

Required Associated Types§

Required Methods§

Source

fn slice<'a>(&'a self, bytes: &'a <Self::Phase as Phase>::Bytes) -> &'a [u8]

Source

fn function(&self, index: usize) -> Option<&Func<Self::Phase>>

Source

fn pack(&self, index: usize) -> Option<impl Iterator<Item = Arg>>

Source

fn unpack_arity(&self, index: usize) -> Option<usize>

Source

fn symbol_valid(&self, index: usize) -> bool

Source

fn constant_valid(&self, index: usize) -> bool

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§

Source§

impl<'c> Context for Content<'c>

Source§

type Phase = Serde<'c>