pub struct Version { /* private fields */ }Expand description
AIM version identifier used in headers and journals.
Encodes a major epoch and minor partial component.
Implementations§
Source§impl Version
impl Version
Sourcepub fn new(epoch: u32, partial: u32, date: DateTime) -> Self
pub fn new(epoch: u32, partial: u32, date: DateTime) -> Self
Construct from explicit epoch and partial components.
Sourcepub fn epoch(&self) -> u32
pub fn epoch(&self) -> u32
Alias for Self::epoch.
Sourcepub fn increment_epoch(&mut self)
pub fn increment_epoch(&mut self)
Increment epoch and reset partial to 0.
Sourcepub fn set_partial(&mut self, partial: u32)
pub fn set_partial(&mut self, partial: u32)
Set partial without changing epoch.
Sourcepub fn increment_partial(&mut self)
pub fn increment_partial(&mut self)
Increment partial within current epoch.
pub fn date(&self) -> DateTime
pub fn set_date(&mut self, date: DateTime)
pub fn print(&self, writer: &mut Writer)
Sourcepub fn to_formula(&self) -> String
pub fn to_formula(&self) -> String
Return the formula-string representation (round-trippable by the parser).
Trait Implementations§
Source§impl WriterLike for Version
impl WriterLike for Version
Source§fn to_stringized(&self) -> String
fn to_stringized(&self) -> String
Return a string representation (raw unsafe output).
Source§fn to_sanitized(&self) -> String
fn to_sanitized(&self) -> String
Return a sanitized string representation (escaped for safe output).
Source§fn to_expressionized(&self) -> String
fn to_expressionized(&self) -> String
Return a sanitized string representation (escaped for safe output).
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.