pub struct ModuleView<'a, T> { /* private fields */ }
Expand description

Represents a lazily evaluated abstraction over a module.

T here is any sort of ModuleAccess. See the documentation in access.rs for more.

Implementations§

source§

impl<'a, T: ModuleAccess> ModuleView<'a, T>

source

pub fn new(module: &'a T) -> Self

source

pub fn self_handle_idx(&self) -> ModuleHandleIndex

source

pub fn module_handles( &self ) -> impl DoubleEndedIterator<Item = ModuleHandleView<'a, T>> + Send

source

pub fn struct_handles( &self ) -> impl DoubleEndedIterator<Item = StructHandleView<'a, T>> + Send

source

pub fn function_handles( &self ) -> impl DoubleEndedIterator<Item = FunctionHandleView<'a, T>> + Send

source

pub fn field_handles( &self ) -> impl DoubleEndedIterator<Item = FieldHandleView<'a, T>> + Send

source

pub fn struct_instantiations( &self ) -> impl DoubleEndedIterator<Item = StructInstantiationView<'a, T>> + Send

source

pub fn function_instantiations( &self ) -> impl DoubleEndedIterator<Item = FunctionInstantiationView<'a, T>> + Send

source

pub fn field_instantiations( &self ) -> impl DoubleEndedIterator<Item = FieldInstantiationView<'a, T>> + Send

source

pub fn signatures( &self ) -> impl DoubleEndedIterator<Item = SignatureView<'a, T>> + Send

source

pub fn structs( &self ) -> impl DoubleEndedIterator<Item = StructDefinitionView<'a, T>> + Send

source

pub fn functions( &self ) -> impl DoubleEndedIterator<Item = FunctionDefinitionView<'a, T>> + Send

source

pub fn function_definition( &self, name: &'a IdentStr ) -> Option<&FunctionDefinitionView<'a, T>>

source

pub fn struct_definition( &self, name: &'a IdentStr ) -> Option<&StructDefinitionView<'a, T>>

source

pub fn function_acquired_resources( &self, function_handle: &FunctionHandle ) -> BTreeSet<StructDefinitionIndex>

source

pub fn id(&self) -> ModuleId

Trait Implementations§

source§

impl<'a, T: ModuleAccess> ViewInternals for ModuleView<'a, T>

§

type ModuleType = &'a T

§

type Inner = &'a T

source§

fn module(&self) -> Self::ModuleType

source§

fn as_inner(&self) -> Self::Inner

Auto Trait Implementations§

§

impl<'a, T> RefUnwindSafe for ModuleView<'a, T>where T: RefUnwindSafe,

§

impl<'a, T> Send for ModuleView<'a, T>where T: Sync,

§

impl<'a, T> Sync for ModuleView<'a, T>where T: Sync,

§

impl<'a, T> Unpin for ModuleView<'a, T>

§

impl<'a, T> UnwindSafe for ModuleView<'a, T>where T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V