pub struct Id<'a> { /* private fields */ }
Expand description
An identifier in a WebAssembly module, prefixed by $
in the textual
format.
An identifier is used to symbolically refer to items in a a wasm module,
typically via the Index
type.
Implementations§
source§impl<'a> Id<'a>
impl<'a> Id<'a>
sourcepub fn new(name: &'a str, span: Span) -> Result<Id<'a>>
pub fn new(name: &'a str, span: Span) -> Result<Id<'a>>
Construct a new identifier from given string.
Returns an error if the string does not contain a leading $
, or is not a
valid WASM text format identifier.
Trait Implementations§
source§impl<'a> PartialEq for Id<'a>
impl<'a> PartialEq for Id<'a>
source§impl Peek for Id<'_>
impl Peek for Id<'_>
impl<'a> Copy for Id<'a>
impl<'a> Eq for Id<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Id<'a>
impl<'a> Send for Id<'a>
impl<'a> Sync for Id<'a>
impl<'a> Unpin for Id<'a>
impl<'a> UnwindSafe for Id<'a>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more