Skip to main content

SharedContext

Trait SharedContext 

Source
pub trait SharedContext<E = <Self as Fallible>::Error> {
    // Required methods
    fn start_shared(
        &mut self,
        address: usize,
        type_id: TypeId,
    ) -> Result<ValidationState, E>;
    fn finish_shared(
        &mut self,
        address: usize,
        type_id: TypeId,
    ) -> Result<(), E>;
}
Expand description

A context that can validate shared archive memory.

Shared pointers require this kind of context to validate.

Required Methods§

Source

fn start_shared( &mut self, address: usize, type_id: TypeId, ) -> Result<ValidationState, E>

Starts validating the value associated with the given address.

Returns an error if the value associated with the given address was started with a different type ID.

Source

fn finish_shared(&mut self, address: usize, type_id: TypeId) -> Result<(), E>

Finishes validating the value associated with the given address.

Returns an error if the given address was not pending.

Implementations on Foreign Types§

Source§

impl<T, E> SharedContext<E> for Strategy<T, E>
where T: SharedContext<E>,

Source§

fn start_shared( &mut self, address: usize, type_id: TypeId, ) -> Result<ValidationState, E>

Source§

fn finish_shared(&mut self, address: usize, type_id: TypeId) -> Result<(), E>

Implementors§

Source§

impl<A, S, E> SharedContext<E> for Validator<A, S>
where S: SharedContext<E>,

Source§

impl<E: Source> SharedContext<E> for SharedValidator