#[repr(u32)]pub enum TokenFlags {
Show 17 variants
None = 0,
PrecedingLineBreak = 1,
PrecedingJSDocComment = 2,
Unterminated = 4,
ExtendedUnicodeEscape = 8,
Scientific = 16,
Octal = 32,
HexSpecifier = 64,
BinarySpecifier = 128,
OctalSpecifier = 256,
ContainsSeparator = 512,
UnicodeEscape = 1_024,
ContainsInvalidEscape = 2_048,
HexEscape = 4_096,
ContainsLeadingZero = 8_192,
ContainsInvalidSeparator = 16_384,
PrecedingJSDocLeadingAsterisks = 32_768,
}Expand description
Token flags indicating special properties of scanned tokens.
Variants§
None = 0
PrecedingLineBreak = 1
PrecedingJSDocComment = 2
Unterminated = 4
ExtendedUnicodeEscape = 8
Scientific = 16
Octal = 32
HexSpecifier = 64
BinarySpecifier = 128
OctalSpecifier = 256
ContainsSeparator = 512
UnicodeEscape = 1_024
ContainsInvalidEscape = 2_048
HexEscape = 4_096
ContainsLeadingZero = 8_192
ContainsInvalidSeparator = 16_384
PrecedingJSDocLeadingAsterisks = 32_768
Trait Implementations§
Source§impl Clone for TokenFlags
impl Clone for TokenFlags
Source§fn clone(&self) -> TokenFlags
fn clone(&self) -> TokenFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenFlags
impl Debug for TokenFlags
Source§impl Default for TokenFlags
impl Default for TokenFlags
Source§fn default() -> TokenFlags
fn default() -> TokenFlags
Returns the “default value” for a type. Read more
Source§impl From<TokenFlags> for JsValue
impl From<TokenFlags> for JsValue
Source§fn from(value: TokenFlags) -> JsValue
fn from(value: TokenFlags) -> JsValue
Converts to this type from the input type.
Source§impl FromWasmAbi for TokenFlags
impl FromWasmAbi for TokenFlags
Source§impl IntoWasmAbi for TokenFlags
impl IntoWasmAbi for TokenFlags
Source§impl OptionFromWasmAbi for TokenFlags
impl OptionFromWasmAbi for TokenFlags
Source§fn is_none(val: &<TokenFlags as FromWasmAbi>::Abi) -> bool
fn is_none(val: &<TokenFlags as FromWasmAbi>::Abi) -> bool
Tests whether the argument is a “none” instance. If so it will be
deserialized as
None, and otherwise it will be passed to
FromWasmAbi.Source§impl OptionIntoWasmAbi for TokenFlags
impl OptionIntoWasmAbi for TokenFlags
Source§fn none() -> <TokenFlags as IntoWasmAbi>::Abi
fn none() -> <TokenFlags as IntoWasmAbi>::Abi
Returns an ABI instance indicating “none”, which JS will interpret as
the
None branch of this option. Read moreSource§impl PartialEq for TokenFlags
impl PartialEq for TokenFlags
Source§impl TryFromJsValue for TokenFlags
impl TryFromJsValue for TokenFlags
Source§fn try_from_js_value_ref(value: &JsValue) -> Option<TokenFlags>
fn try_from_js_value_ref(value: &JsValue) -> Option<TokenFlags>
Performs the conversion.
Source§impl VectorFromWasmAbi for TokenFlags
impl VectorFromWasmAbi for TokenFlags
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <TokenFlags as VectorFromWasmAbi>::Abi, ) -> Box<[TokenFlags]>
Source§impl VectorIntoWasmAbi for TokenFlags
impl VectorIntoWasmAbi for TokenFlags
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[TokenFlags]>, ) -> <TokenFlags as VectorIntoWasmAbi>::Abi
impl Copy for TokenFlags
impl Eq for TokenFlags
impl StructuralPartialEq for TokenFlags
Auto Trait Implementations§
impl Freeze for TokenFlags
impl RefUnwindSafe for TokenFlags
impl Send for TokenFlags
impl Sync for TokenFlags
impl Unpin for TokenFlags
impl UnsafeUnpin for TokenFlags
impl UnwindSafe for TokenFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.