pub enum EcmaScriptTarget {
Es5,
Es2015,
Es2016,
Es2017,
Es2018,
Es2019,
Es2020,
Es2021,
Es2022,
Es2023,
Es2024,
EsNext,
}Expand description
Common ECMAScript language target labels.
Variants§
Implementations§
Source§impl EcmaScriptTarget
impl EcmaScriptTarget
Sourcepub const fn year(self) -> Option<EcmaScriptYear>
pub const fn year(self) -> Option<EcmaScriptYear>
Returns the annual edition year when the target has one.
Sourcepub 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§
Source§impl Clone for EcmaScriptTarget
impl Clone for EcmaScriptTarget
Source§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 moreSource§impl Debug for EcmaScriptTarget
impl Debug for EcmaScriptTarget
Source§impl Display for EcmaScriptTarget
impl Display for EcmaScriptTarget
Source§impl FromStr for EcmaScriptTarget
impl FromStr for EcmaScriptTarget
Source§impl Hash for EcmaScriptTarget
impl Hash for EcmaScriptTarget
Source§impl Ord for EcmaScriptTarget
impl Ord for EcmaScriptTarget
Source§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
Source§impl PartialEq for EcmaScriptTarget
impl PartialEq for EcmaScriptTarget
Source§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