Struct rkyv::validation::validators::ArchiveValidator [−][src]
pub struct ArchiveValidator<'a> { /* fields omitted */ }
Expand description
A validator that can verify archives with nonlocal memory.
Implementations
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.
Trait Implementations
type PrefixRange = PrefixRange
type PrefixRange = PrefixRange
A prefix range from an archive context. Read more
type SuffixRange = SuffixRange
type SuffixRange = SuffixRange
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
unsafe fn push_prefix_subtree_range(
&mut self,
root: *const u8,
end: *const u8
) -> Result<PrefixRange, Self::Error>
unsafe fn push_prefix_subtree_range(
&mut self,
root: *const u8,
end: *const u8
) -> Result<PrefixRange, Self::Error>
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
unsafe fn push_suffix_subtree_range(
&mut self,
start: *const u8,
root: *const u8
) -> Result<SuffixRange, Self::Error>
unsafe fn push_suffix_subtree_range(
&mut self,
start: *const u8,
root: *const u8
) -> Result<SuffixRange, Self::Error>
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
unsafe fn check_rel_ptr<T: ArchivePointee + LayoutRaw + ?Sized>(
&mut self,
rel_ptr: &RelPtr<T>
) -> Result<*const T, Self::Error>
unsafe fn check_rel_ptr<T: ArchivePointee + LayoutRaw + ?Sized>(
&mut self,
rel_ptr: &RelPtr<T>
) -> Result<*const T, Self::Error>
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
unsafe fn check_subtree_rel_ptr<T: ArchivePointee + LayoutRaw + ?Sized>(
&mut self,
rel_ptr: &RelPtr<T>
) -> Result<*const T, Self::Error>
unsafe fn check_subtree_rel_ptr<T: ArchivePointee + LayoutRaw + ?Sized>(
&mut self,
rel_ptr: &RelPtr<T>
) -> Result<*const T, Self::Error>
Checks that the given RelPtr
to a subtree can be dereferenced. Read more
unsafe fn push_prefix_subtree<T: LayoutRaw + ?Sized>(
&mut self,
root: *const T
) -> Result<Self::PrefixRange, Self::Error>
unsafe fn push_prefix_subtree<T: LayoutRaw + ?Sized>(
&mut self,
root: *const T
) -> Result<Self::PrefixRange, Self::Error>
Pushes a new subtree range onto the validator and starts validating it. Read more
type Error = ArchiveError
type Error = ArchiveError
The error produced by any failing methods.
Auto Trait Implementations
impl<'a> RefUnwindSafe for ArchiveValidator<'a>
impl<'a> !Send for ArchiveValidator<'a>
impl<'a> !Sync for ArchiveValidator<'a>
impl<'a> Unpin for ArchiveValidator<'a>
impl<'a> UnwindSafe for ArchiveValidator<'a>
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
D: Fallible + ?Sized,
F: ?Sized,
W: DeserializeWith<F, T, D>,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
D: Fallible + ?Sized,
F: ?Sized,
W: DeserializeWith<F, T, D>,