Skip to main content

VersioningError

Enum VersioningError 

Source
pub enum VersioningError {
Show 26 variants VersionOutsideEnum { target: String, }, DuplicateVersionEnum { first: String, second: String, }, EmptyVersionEnum { ident: String, }, DuplicateVersionValue { value: String, first: String, second: String, }, MissingVersionEnum { annotation: String, decl: String, }, MalformedVersionReference { annotation: String, decl: String, }, MalformedVersionMarker { decl: String, }, MalformedVersionParameter { decl: String, reason: String, }, DuplicateVersionParameter { decl: String, }, UnknownVersionReference { annotation: String, decl: String, reference: String, declared: String, }, UnsupportedVersionAnnotation { name: String, decl: String, }, UnsupportedVersionTarget { annotation: String, target: String, }, VersionedVersionEnum { annotation: String, ident: String, }, DuplicateLifecycleAnnotation { annotation: String, decl: String, }, EmptyAvailability { decl: String, added: String, removed: String, }, ChildOutsideParent { decl: String, parent: String, version: String, }, DanglingReference { decl: String, reference: String, version: String, }, UnversionedSpecification { selection: String, }, UnknownSelectedVersion { selection: String, declared: String, }, AmbiguousSelectedVersion { selection: String, first: String, second: String, }, UnknownVersion { index: usize, }, ConflictingSelection { first: String, second: String, }, EmptySelection, SelectionRequiresOneVersion { selection: String, }, UnknownVersionLayout { value: String, }, DuplicateWireName { container: String, wire: String, first: String, second: String, version: Option<String>, },
}
Expand description

Diagnostics raised while analysing or projecting API versioning annotations.

Variants§

§

VersionOutsideEnum

@version applied to a declaration that is not an enum.

Fields

§target: String
§

DuplicateVersionEnum

Two enums in one specification carry the @version marker.

Fields

§first: String
§second: String
§

EmptyVersionEnum

The @version enum declares no members.

Fields

§ident: String
§

DuplicateVersionValue

Two version members resolve to the same display value.

Fields

§value: String
§first: String
§second: String
§

MissingVersionEnum

A lifecycle annotation appears without a @version enum in the specification.

Fields

§annotation: String
§decl: String
§

MalformedVersionReference

A lifecycle annotation argument is not an Enum::member reference.

Fields

§annotation: String
§decl: String
§

MalformedVersionMarker

A raw version marker failed to lower into a valid typed annotation.

Fields

§decl: String
§

MalformedVersionParameter

A version parameter violates its argument or wire-location contract.

Fields

§decl: String
§reason: String
§

DuplicateVersionParameter

A version timeline declares more than one version marker or parameter.

Fields

§decl: String
§

UnknownVersionReference

A lifecycle annotation references a version the timeline does not declare.

Fields

§annotation: String
§decl: String
§reference: String
§declared: String
§

UnsupportedVersionAnnotation

A rejected versioning annotation has no supported contract semantics.

Fields

§name: String
§decl: String
§

UnsupportedVersionTarget

A lifecycle annotation applied to a declaration that cannot carry it.

Fields

§annotation: String
§target: String
§

VersionedVersionEnum

The @version enum itself carries a lifecycle annotation.

Fields

§annotation: String
§ident: String
§

DuplicateLifecycleAnnotation

The same lifecycle annotation appears twice on one declaration.

Fields

§annotation: String
§decl: String
§

EmptyAvailability

@added and @removed leave an empty availability interval.

Fields

§decl: String
§added: String
§removed: String
§

ChildOutsideParent

A child’s annotated interval reaches outside its parent’s interval.

Fields

§decl: String
§parent: String
§version: String
§

DanglingReference

A surviving declaration references a declaration the projection drops.

Fields

§decl: String
§reference: String
§version: String
§

UnversionedSpecification

A version selection was requested for a specification without a @version enum.

Fields

§selection: String
§

UnknownSelectedVersion

A requested version is not declared by the timeline.

Fields

§selection: String
§declared: String
§

AmbiguousSelectedVersion

A requested version matches both a member ident and another member’s value.

Fields

§selection: String
§first: String
§second: String
§

UnknownVersion

The projector received a version position outside the timeline.

Fields

§index: usize
§

ConflictingSelection

Both version selection properties were set.

Fields

§first: String
§second: String
§

EmptySelection

The requested version selection is empty.

§

SelectionRequiresOneVersion

api_version received *, which only api_versions accepts.

Fields

§selection: String
§

UnknownVersionLayout

The version layout property holds an unknown value.

Fields

§value: String
§

DuplicateWireName

Two declarations available in the same version resolve to the same effective wire name inside one container.

Fields

§container: String
§wire: String
§first: String
§second: String
§version: Option<String>

Trait Implementations§

Source§

impl Clone for VersioningError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VersioningError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for VersioningError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for VersioningError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<VersioningError> for ParseError

Source§

fn from(err: VersioningError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.