Skip to main content

WithShared

Trait WithShared 

Source
pub trait WithShared<'s, 'sh: 's, 'str: 'sh> {
    // Required method
    fn shared(&'s self) -> &'sh Shared<'str>;
}
Expand description

The shared-leaf twin of WithCtx: a ref that can yield the module’s Shared IR state (interners, spaces, registers, name map) for its read methods. Implemented by the shared-leaf wrapper refs (literal, bytes, varnode) — which now carry only a &Shared — and by their &mut Context mutation twins (which narrow through self.ctx.shared). This replaces the leaf refs’ old WithCtx dependency: a shared-leaf value never needs the whole &Context, only its shared part (context-split stage 5b-ii item #1).

Required Methods§

Source

fn shared(&'s self) -> &'sh Shared<'str>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<'s, 'ctx: 's, 'str: 'ctx> WithShared<'s, 'ctx, 'str> for BytesRef<'str, 'ctx>

Source§

impl<'s, 'ctx: 's, 'str: 'ctx> WithShared<'s, 'ctx, 'str> for LiteralRef<'str, 'ctx>

Source§

impl<'s, 'ctx: 's, 'str: 'ctx> WithShared<'s, 'ctx, 'str> for PoisonRef<'str, 'ctx>

Source§

impl<'s, 'ctx: 's, 'str: 'ctx> WithShared<'s, 'ctx, 'str> for VarnodeRef<'str, 'ctx>

Source§

impl<'s, 'ctx: 's, 'str: 'ctx> WithShared<'s, 's, 'str> for VarnodeMutRef<'str, 'ctx>