Enum git_revision::Spec
source · [−]pub enum Spec {
Include(ObjectId),
Exclude(ObjectId),
Range {
from: ObjectId,
to: ObjectId,
},
Merge {
theirs: ObjectId,
ours: ObjectId,
},
IncludeOnlyParents(ObjectId),
ExcludeParents(ObjectId),
}
Expand description
A revision specification without any bindings to a repository, useful for serialization or movement over thread boundaries.
Note that all object ids should be a committish, but don’t have to be.
Unless the field name contains _exclusive
, the respective objects are included in the set.
Variants
Include(ObjectId)
Include commits reachable from this revision, i.e. a
and its ancestors.
The equivalent to crate::spec::Kind::IncludeReachable, but with data.
Exclude(ObjectId)
Exclude commits reachable from this revision, i.e. a
and its ancestors. Example: ^a
.
The equivalent to crate::spec::Kind::ExcludeReachable, but with data.
Range
Fields
from: ObjectId
The starting point of the range, which is included in the set.
to: ObjectId
The end point of the range, which is included in the set.
Every commit that is reachable from from
to to
, but not any ancestors of from
. Example: from..to
.
The equivalent to crate::spec::Kind::RangeBetween, but with data.
Merge
Fields
theirs: ObjectId
Their side of the merge, which is included in the set.
ours: ObjectId
Our side of the merge, which is included in the set.
Every commit reachable through either theirs
or ours
, but no commit that is reachable by both. Example: theirs...ours
.
The equivalent to crate::spec::Kind::ReachableToMergeBase, but with data.
IncludeOnlyParents(ObjectId)
Tuple Fields
0: ObjectId
Include only the parents of this object, but not the object itself.
Include every commit of all parents of a
, but not a
itself. Example: a^@
.
The equivalent to crate::spec::Kind::IncludeReachableFromParents, but with data.
ExcludeParents(ObjectId)
Tuple Fields
0: ObjectId
Exclude the parents of this object, but not the object itself.
Exclude every commit of all parents of a
, but not a
itself. Example: a^!
.
The equivalent to crate::spec::Kind::ExcludeReachableFromParents, but with data.
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Spec
impl<'de> Deserialize<'de> for Spec
sourcefn 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
sourceimpl Ord for Spec
impl Ord for Spec
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Spec> for Spec
impl PartialEq<Spec> for Spec
sourceimpl PartialOrd<Spec> for Spec
impl PartialOrd<Spec> for Spec
sourcefn partial_cmp(&self, other: &Spec) -> Option<Ordering>
fn partial_cmp(&self, other: &Spec) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Spec
impl Eq for Spec
impl StructuralEq for Spec
impl StructuralPartialEq for Spec
Auto Trait Implementations
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more