[][src]Struct rslint_core::groups::errors::NoNewSymbol

pub struct NoNewSymbol {}

Disallow constructing Symbol using new.

Symbol shouldn't be constructed using new keyword since it results in a TypeError, instead it should be called as a function.

Incorrect code examples

// This call results in TypeError
const fooSymbol = new Symbol("foo");

Correct code examples

const fooSymbol = Symbol("foo");

Implementations

impl NoNewSymbol[src]

pub fn new() -> Self[src]

Trait Implementations

impl Clone for NoNewSymbol[src]

impl CstRule for NoNewSymbol[src]

impl Debug for NoNewSymbol[src]

impl Default for NoNewSymbol[src]

impl<'de> Deserialize<'de> for NoNewSymbol[src]

impl Rule for NoNewSymbol[src]

impl Serialize for NoNewSymbol[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> Erasable for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.