pub struct PatchIndex(/* private fields */);Expand description
Zero-based index of a patch within a multi-patch chain.
Used by crate::index::PatchSource::read and surfaced in
crate::IndexError::PatchIndexOutOfRange to identify which patch in the
chain a crate::index::Plan is referring to. The first patch added to a
crate::index::PlanBuilder is PatchIndex(0), the second
PatchIndex(1), and so on.
Implementations§
Source§impl PatchIndex
impl PatchIndex
Trait Implementations§
Source§impl Clone for PatchIndex
impl Clone for PatchIndex
Source§fn clone(&self) -> PatchIndex
fn clone(&self) -> PatchIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PatchIndex
impl Debug for PatchIndex
Source§impl<'de> Deserialize<'de> for PatchIndex
impl<'de> Deserialize<'de> for PatchIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PatchIndex
impl Display for PatchIndex
Source§impl From<PatchIndex> for u32
impl From<PatchIndex> for u32
Source§fn from(v: PatchIndex) -> Self
fn from(v: PatchIndex) -> Self
Converts to this type from the input type.
Source§impl From<u32> for PatchIndex
impl From<u32> for PatchIndex
Source§impl Hash for PatchIndex
impl Hash for PatchIndex
Source§impl Ord for PatchIndex
impl Ord for PatchIndex
Source§fn cmp(&self, other: &PatchIndex) -> Ordering
fn cmp(&self, other: &PatchIndex) -> Ordering
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
Source§impl PartialEq for PatchIndex
impl PartialEq for PatchIndex
Source§fn eq(&self, other: &PatchIndex) -> bool
fn eq(&self, other: &PatchIndex) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PatchIndex
impl PartialOrd for PatchIndex
Source§impl Serialize for PatchIndex
impl Serialize for PatchIndex
impl Copy for PatchIndex
impl Eq for PatchIndex
impl StructuralPartialEq for PatchIndex
Auto Trait Implementations§
impl Freeze for PatchIndex
impl RefUnwindSafe for PatchIndex
impl Send for PatchIndex
impl Sync for PatchIndex
impl Unpin for PatchIndex
impl UnsafeUnpin for PatchIndex
impl UnwindSafe for PatchIndex
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,
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more