Struct PhpVersion
pub struct PhpVersion { /* private fields */ }Expand description
Lightweight PHP version metadata.
Implementations§
§impl PhpVersion
impl PhpVersion
pub fn new( major: u16, minor: Option<u16>, patch: Option<u16>, ) -> Result<PhpVersion, PhpVersionParseError>
pub const fn major(&self) -> u16
pub const fn minor(&self) -> Option<u16>
pub const fn patch(&self) -> Option<u16>
pub fn suffix(&self) -> Option<&str>
pub const fn is_php8_or_newer(&self) -> bool
Trait Implementations§
§impl Clone for PhpVersion
impl Clone for PhpVersion
§fn clone(&self) -> PhpVersion
fn clone(&self) -> PhpVersion
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 PhpVersion
impl Debug for PhpVersion
§impl Display for PhpVersion
impl Display for PhpVersion
§impl FromStr for PhpVersion
impl FromStr for PhpVersion
§impl Hash for PhpVersion
impl Hash for PhpVersion
§impl Ord for PhpVersion
impl Ord for PhpVersion
§impl PartialEq for PhpVersion
impl PartialEq for PhpVersion
§impl PartialOrd for PhpVersion
impl PartialOrd for PhpVersion
impl Eq for PhpVersion
impl StructuralPartialEq for PhpVersion
Auto Trait Implementations§
impl Freeze for PhpVersion
impl RefUnwindSafe for PhpVersion
impl Send for PhpVersion
impl Sync for PhpVersion
impl Unpin for PhpVersion
impl UnsafeUnpin for PhpVersion
impl UnwindSafe for PhpVersion
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