swc_ecma_utils::ident

Trait IdentLike

Source
pub trait IdentLike: Sized {
    // Required methods
    fn from_ident(i: &Ident) -> Self;
    fn to_id(&self) -> Id;
    fn into_id(self) -> Id;
}

Required Methods§

Source

fn from_ident(i: &Ident) -> Self

Source

fn to_id(&self) -> Id

Source

fn into_id(self) -> Id

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IdentLike for (JsWord, SyntaxContext)

Source§

fn from_ident(i: &Ident) -> Self

Source§

fn to_id(&self) -> Id

Source§

fn into_id(self) -> Id

Source§

impl IdentLike for (JsWord, Span)

Source§

fn from_ident(i: &Ident) -> Self

Source§

fn to_id(&self) -> Id

Source§

fn into_id(self) -> Id

Source§

impl IdentLike for BindingIdent

Source§

fn from_ident(i: &Ident) -> Self

Source§

fn to_id(&self) -> Id

Source§

fn into_id(self) -> Id

Source§

impl IdentLike for Ident

Source§

fn from_ident(i: &Ident) -> Self

Source§

fn to_id(&self) -> Id

Source§

fn into_id(self) -> Id

Implementors§