Enum EcmaScriptTarget
pub enum EcmaScriptTarget {
Es5,
Es2015,
Es2016,
Es2017,
Es2018,
Es2019,
Es2020,
Es2021,
Es2022,
Es2023,
Es2024,
EsNext,
}Expand description
Common ECMAScript language target labels.
Variants§
Implementations§
§impl EcmaScriptTarget
impl EcmaScriptTarget
pub const fn year(self) -> Option<EcmaScriptYear>
pub const fn year(self) -> Option<EcmaScriptYear>
Returns the annual edition year when the target has one.
pub const fn edition(self) -> Option<EcmaScriptEdition>
pub const fn edition(self) -> Option<EcmaScriptEdition>
Returns the edition number when the target maps to a stable edition.
Trait Implementations§
§impl Clone for EcmaScriptTarget
impl Clone for EcmaScriptTarget
§fn clone(&self) -> EcmaScriptTarget
fn clone(&self) -> EcmaScriptTarget
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 more§impl Debug for EcmaScriptTarget
impl Debug for EcmaScriptTarget
§impl Display for EcmaScriptTarget
impl Display for EcmaScriptTarget
Source§impl From<EcmaScriptTarget> for TsTarget
impl From<EcmaScriptTarget> for TsTarget
Source§fn from(value: EcmaScriptTarget) -> TsTarget
fn from(value: EcmaScriptTarget) -> TsTarget
Converts to this type from the input type.
§impl FromStr for EcmaScriptTarget
impl FromStr for EcmaScriptTarget
§type Err = EcmaScriptParseError
type Err = EcmaScriptParseError
The associated error which can be returned from parsing.
§fn from_str(
input: &str,
) -> Result<EcmaScriptTarget, <EcmaScriptTarget as FromStr>::Err>
fn from_str( input: &str, ) -> Result<EcmaScriptTarget, <EcmaScriptTarget as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for EcmaScriptTarget
impl Hash for EcmaScriptTarget
§impl Ord for EcmaScriptTarget
impl Ord for EcmaScriptTarget
§fn cmp(&self, other: &EcmaScriptTarget) -> Ordering
fn cmp(&self, other: &EcmaScriptTarget) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialEq for EcmaScriptTarget
impl PartialEq for EcmaScriptTarget
§impl PartialOrd for EcmaScriptTarget
impl PartialOrd for EcmaScriptTarget
impl Copy for EcmaScriptTarget
impl Eq for EcmaScriptTarget
impl StructuralPartialEq for EcmaScriptTarget
Auto Trait Implementations§
impl Freeze for EcmaScriptTarget
impl RefUnwindSafe for EcmaScriptTarget
impl Send for EcmaScriptTarget
impl Sync for EcmaScriptTarget
impl Unpin for EcmaScriptTarget
impl UnsafeUnpin for EcmaScriptTarget
impl UnwindSafe for EcmaScriptTarget
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