pub trait SharedContext: Fallible {
    // Required method
    fn register_shared_ptr(
        &mut self,
        ptr: *const u8,
        type_id: TypeId
    ) -> Result<bool, Self::Error>;
}
Expand description

A context that can validate shared archive memory.

Shared pointers require this kind of context to validate.

Required Methods§

source

fn register_shared_ptr( &mut self, ptr: *const u8, type_id: TypeId ) -> Result<bool, Self::Error>

Registers the given ptr as a shared pointer with the given type.

Returns true if the pointer was newly-registered and check_bytes should be called.

Implementors§