pub struct BunVersion { /* private fields */ }Expand description
Bun version metadata.
Implementations§
Source§impl BunVersion
impl BunVersion
Sourcepub const fn new(
major: u16,
minor: Option<u16>,
patch: Option<u16>,
) -> Result<BunVersion, BunVersionParseError>
pub const fn new( major: u16, minor: Option<u16>, patch: Option<u16>, ) -> Result<BunVersion, BunVersionParseError>
Creates Bun version metadata.
§Errors
Returns BunVersionParseError::InvalidVersion when the major version is zero.
Trait Implementations§
Source§impl Clone for BunVersion
impl Clone for BunVersion
Source§fn clone(&self) -> BunVersion
fn clone(&self) -> BunVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BunVersion
impl Debug for BunVersion
Source§impl FromStr for BunVersion
impl FromStr for BunVersion
Source§type Err = BunVersionParseError
type Err = BunVersionParseError
The associated error which can be returned from parsing.
Source§fn from_str(input: &str) -> Result<BunVersion, <BunVersion as FromStr>::Err>
fn from_str(input: &str) -> Result<BunVersion, <BunVersion as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for BunVersion
impl Hash for BunVersion
Source§impl Ord for BunVersion
impl Ord for BunVersion
Source§fn cmp(&self, other: &BunVersion) -> Ordering
fn cmp(&self, other: &BunVersion) -> Ordering
1.21.0 (const: unstable) · 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 BunVersion
impl PartialEq for BunVersion
Source§fn eq(&self, other: &BunVersion) -> bool
fn eq(&self, other: &BunVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for BunVersion
impl PartialOrd for BunVersion
impl Copy for BunVersion
impl Eq for BunVersion
impl StructuralPartialEq for BunVersion
Auto Trait Implementations§
impl Freeze for BunVersion
impl RefUnwindSafe for BunVersion
impl Send for BunVersion
impl Sync for BunVersion
impl Unpin for BunVersion
impl UnsafeUnpin for BunVersion
impl UnwindSafe for BunVersion
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