#[non_exhaustive]pub struct UnitDescription {
pub package: String,
pub version: String,
pub target: String,
pub position: usize,
}Expand description
Enough of a unit’s identity to name it in an error message.
A unit that could not be matched has to be described from whichever side saw it, so the fields that side does not know are empty rather than invented.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.package: StringPackage name, where it is known.
version: StringPackage version, where it is known.
target: StringTarget within the package: lib, a binary name, or a build-script phase.
position: usizeWhere in its input the unit was seen, counted from one, for locating it by eye.
Trait Implementations§
Source§impl Clone for UnitDescription
impl Clone for UnitDescription
Source§impl Debug for UnitDescription
impl Debug for UnitDescription
Source§impl Display for UnitDescription
impl Display for UnitDescription
impl Eq for UnitDescription
Source§impl Ord for UnitDescription
impl Ord for UnitDescription
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for UnitDescription
impl PartialEq for UnitDescription
Source§impl PartialOrd for UnitDescription
impl PartialOrd for UnitDescription
impl StructuralPartialEq for UnitDescription
Auto Trait Implementations§
impl Freeze for UnitDescription
impl RefUnwindSafe for UnitDescription
impl Send for UnitDescription
impl Sync for UnitDescription
impl Unpin for UnitDescription
impl UnsafeUnpin for UnitDescription
impl UnwindSafe for UnitDescription
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