Struct EcmaScriptYear
pub struct EcmaScriptYear(/* private fields */);Expand description
Calendar year for annual ECMAScript editions.
Implementations§
§impl EcmaScriptYear
impl EcmaScriptYear
pub const fn new(year: u16) -> Result<EcmaScriptYear, EcmaScriptParseError>
pub const fn new(year: u16) -> Result<EcmaScriptYear, EcmaScriptParseError>
Creates a supported ECMAScript edition year.
§Errors
Returns EcmaScriptParseError::UnsupportedYear when year is outside ES2015..=ES2024.
Trait Implementations§
§impl Clone for EcmaScriptYear
impl Clone for EcmaScriptYear
§fn clone(&self) -> EcmaScriptYear
fn clone(&self) -> EcmaScriptYear
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 EcmaScriptYear
impl Debug for EcmaScriptYear
§impl Display for EcmaScriptYear
impl Display for EcmaScriptYear
§impl FromStr for EcmaScriptYear
impl FromStr for EcmaScriptYear
§type Err = EcmaScriptParseError
type Err = EcmaScriptParseError
The associated error which can be returned from parsing.
§fn from_str(
input: &str,
) -> Result<EcmaScriptYear, <EcmaScriptYear as FromStr>::Err>
fn from_str( input: &str, ) -> Result<EcmaScriptYear, <EcmaScriptYear as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for EcmaScriptYear
impl Hash for EcmaScriptYear
§impl Ord for EcmaScriptYear
impl Ord for EcmaScriptYear
§impl PartialEq for EcmaScriptYear
impl PartialEq for EcmaScriptYear
§impl PartialOrd for EcmaScriptYear
impl PartialOrd for EcmaScriptYear
impl Copy for EcmaScriptYear
impl Eq for EcmaScriptYear
impl StructuralPartialEq for EcmaScriptYear
Auto Trait Implementations§
impl Freeze for EcmaScriptYear
impl RefUnwindSafe for EcmaScriptYear
impl Send for EcmaScriptYear
impl Sync for EcmaScriptYear
impl Unpin for EcmaScriptYear
impl UnsafeUnpin for EcmaScriptYear
impl UnwindSafe for EcmaScriptYear
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