logo
pub struct ArchiveValidator<'a> { /* private fields */ }
Expand description

A validator that can verify archives with nonlocal memory.

Implementations

Creates a new bounds validator for the given bytes.

Crates a new bounds validator for the given bytes with a maximum validation depth.

Returns the log base 2 of the alignment of the archive.

An archive that is 2-aligned will return 1, 4-aligned will return 2, 8-aligned will return 3 and so on.

Returns the alignment of the archive.

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

Formats the value using the given formatter. Read more

The error produced by any failing methods.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Gets the layout of the type.

The type for metadata in pointers and references to Self.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.