pub struct VersioningRecord { /* private fields */ }Expand description
Result of analysing the API versioning annotations of a specification.
Implementations§
Source§impl VersioningRecord
impl VersioningRecord
Sourcepub fn analyze(spec: &Specification) -> ParserResult<Option<VersioningRecord>>
pub fn analyze(spec: &Specification) -> ParserResult<Option<VersioningRecord>>
Validates every API versioning annotation of a specification.
Validation always runs, even when no version is projected. Returns
None for specifications without a @version enum, and fails when
lifecycle annotations appear without one.
Sourcepub fn timeline(&self) -> &VersionTimeline
pub fn timeline(&self) -> &VersionTimeline
The version history declared by the @version enum.
Sourcepub fn project(
&self,
spec: &Specification,
version: VersionId,
) -> ParserResult<Specification>
pub fn project( &self, spec: &Specification, version: VersionId, ) -> ParserResult<Specification>
Projects version into an ordinary specification.
Sourcepub fn merge(
&self,
spec: &Specification,
versions: &[VersionId],
) -> ParserResult<Specification>
pub fn merge( &self, spec: &Specification, versions: &[VersionId], ) -> ParserResult<Specification>
Projects every selected version into one specification with one module per version, in timeline order.
Trait Implementations§
Source§impl Clone for VersioningRecord
impl Clone for VersioningRecord
Auto Trait Implementations§
impl Freeze for VersioningRecord
impl RefUnwindSafe for VersioningRecord
impl Send for VersioningRecord
impl Sync for VersioningRecord
impl Unpin for VersioningRecord
impl UnsafeUnpin for VersioningRecord
impl UnwindSafe for VersioningRecord
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