pub struct FuncToValidate<T> {
pub resources: T,
pub index: u32,
pub ty: u32,
pub features: WasmFeatures,
}Expand description
Resources necessary to perform validation of a function.
This structure is created by
Validator::code_section_entry and
is created per-function in a WebAssembly module. This structure is suitable
for sending to other threads while the original
Validator continues processing other functions.
Fields§
§resources: TReusable, heap allocated resources to drive the Wasm validation.
index: u32The core Wasm function index being validated.
ty: u32The core Wasm type index of the function being validated, defining the results and parameters to the function.
features: WasmFeaturesThe Wasm features enabled to validate the function.
Implementations§
Source§impl<T> FuncToValidate<T>where
T: WasmModuleResources,
impl<T> FuncToValidate<T>where
T: WasmModuleResources,
Sourcepub fn into_validator(
self,
allocs: FuncValidatorAllocations,
) -> FuncValidator<T>
pub fn into_validator( self, allocs: FuncValidatorAllocations, ) -> FuncValidator<T>
Converts this FuncToValidate into a FuncValidator using the
allocs provided.
This method, in conjunction with FuncValidator::into_allocations,
provides a means to reuse allocations across validation of each
individual function. Note that it is also sufficient to call this
method with Default::default() if no prior allocations are
available.
§Panics
If a FuncToValidate was created with an invalid ty index then this
function will panic.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for FuncToValidate<T>where
T: Freeze,
impl<T> RefUnwindSafe for FuncToValidate<T>where
T: RefUnwindSafe,
impl<T> Send for FuncToValidate<T>where
T: Send,
impl<T> Sync for FuncToValidate<T>where
T: Sync,
impl<T> Unpin for FuncToValidate<T>where
T: Unpin,
impl<T> UnwindSafe for FuncToValidate<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.