pub trait DynContext {
    unsafe fn bounds_check_ptr_dyn(
        &mut self,
        base: *const u8,
        offset: isize
    ) -> Result<*const u8, Box<dyn Error>>; unsafe fn bounds_check_layout_dyn(
        &mut self,
        data_address: *const u8,
        layout: &Layout
    ) -> Result<(), Box<dyn Error>>; unsafe fn bounds_check_subtree_ptr_layout_dyn(
        &mut self,
        data_address: *const u8,
        layout: &Layout
    ) -> Result<(), Box<dyn Error>>; unsafe fn push_prefix_subtree_range_dyn(
        &mut self,
        root: *const u8,
        end: *const u8
    ) -> Result<Box<dyn Any>, Box<dyn Error>>; fn pop_prefix_range_dyn(
        &mut self,
        range: Box<dyn Any>
    ) -> Result<(), Box<dyn Error>>; unsafe fn push_suffix_subtree_range_dyn(
        &mut self,
        start: *const u8,
        root: *const u8
    ) -> Result<Box<dyn Any>, Box<dyn Error>>; fn pop_suffix_range_dyn(
        &mut self,
        range: Box<dyn Any>
    ) -> Result<(), Box<dyn Error>>; fn finish_dyn(&mut self) -> Result<(), Box<dyn Error>>; fn register_shared_ptr_dyn(
        &mut self,
        ptr: *const u8,
        type_id: TypeId
    ) -> Result<bool, Box<dyn Error>>; }
Expand description

A context that’s object safe and suitable for checking most types.

Required Methods

Checks that a relative pointer points to an address within the archive.

See bounds_check_ptr for more information.

Safety
  • base must be inside the archive this valiator was created for.

Checks that a given pointer can be dereferenced.

See bounds_check_layout for more information.

Safety
  • data_address must be inside the archive this validator was created for.
  • layout must be the layout for the given pointer.

Checks that the given data address and layout is located completely within the subtree range.

See bounds_check_subtree_ptr_layout for more information.

Safety
  • data_address must be inside the archive this validator was created for.

Pushes a new subtree range onto the validator and starts validating it.

See push_prefix_subtree_range for more information.

Safety

root and end must be located inside the archive.

Pops the given range, restoring the original state with the pushed range removed.

See pop_prefix_range for more information.

Pushes a new subtree range onto the validator and starts validating it.

See push_suffix_subtree_range for more information.

Safety

start and root must be located inside the archive.

Finishes the given range, restoring the original state with the pushed range removed.

See pop_suffix_range for more information.

Verifies that all outstanding claims have been returned.

See finish for more information.

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

See register_shared_ptr for more information.

Trait Implementations

A prefix range from an archive context. Read more

A suffix range from an archive context. Read more

Checks that a relative pointer points to an address within the archive. Read more

Checks that a given pointer can be dereferenced. Read more

Checks that the given data address and layout is located completely within the subtree range. Read more

Pushes a new subtree range onto the validator and starts validating it. Read more

Pops the given range, restoring the original state with the pushed range removed. Read more

Pushes a new subtree range onto the validator and starts validating it. Read more

Finishes the given range, restoring the original state with the pushed range removed. Read more

Verifies that all outstanding claims have been returned.

Checks that the given relative pointer can be dereferenced. Read more

Checks that the given RelPtr can be dereferenced. Read more

Checks that the given pointer is located completely within the subtree range. Read more

Checks that the given relative pointer to a subtree can be dereferenced. Read more

Checks that the given RelPtr to a subtree can be dereferenced. Read more

Pushes a new subtree range onto the validator and starts validating it. Read more

The error produced by any failing methods.

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

Implementors