Skip to main content

AsShared

Trait AsShared 

Source
pub trait AsShared<'a, 'str> {
    // Required method
    fn as_shared(self) -> &'a Shared<'str>;
}
Expand description

Narrows a module handle to its Shared IR state, so the shared-leaf wrapper-ref constructors (Varnode::from_id, Space::from_id, LiteralRef/BytesRef) accept either a whole &Context (module scope) or a bare &Shared (pass scope, via QCodeView::shared() / BodyMut::shr()) with no call-site churn (context-split stage 5b-ii item #1). The leaf refs themselves store only a &Shared.

Required Methods§

Source

fn as_shared(self) -> &'a Shared<'str>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, 'str> AsShared<'a, 'str> for &'a Context<'str>

Source§

impl<'a, 'str> AsShared<'a, 'str> for &'a Shared<'str>