pub enum ObjectExpansion {
AsIs,
TreeContents,
TreeAdditionsComparedToAncestor,
}Expand description
The way input objects are handled
Variants
AsIs
Don’t do anything with the input objects except for transforming them into pack entries
TreeContents
If the input object is a Commit then turn it into a pack entry. Additionally obtain its tree, turn it into a pack entry
along with all of its contents, that is nested trees, and any other objects reachable from it.
Otherwise, the same as AsIs.
This mode is useful if all reachable objects should be added, as in cloning a repository.
TreeAdditionsComparedToAncestor
If the input is a commit, obtain its ancestors and turn them into pack entries. Obtain the ancestor trees along with the commits
tree and turn them into pack entries. Finally obtain the added/changed objects when comparing the ancestor trees with the
current tree and turn them into entries as well.
Otherwise, the same as AsIs.
This mode is useful to build a pack containing only new objects compared to a previous state.
Trait Implementations
sourceimpl Clone for ObjectExpansion
impl Clone for ObjectExpansion
sourcefn clone(&self) -> ObjectExpansion
fn clone(&self) -> ObjectExpansion
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ObjectExpansion
impl Debug for ObjectExpansion
sourceimpl Default for ObjectExpansion
impl Default for ObjectExpansion
sourceimpl<'de> Deserialize<'de> for ObjectExpansion
impl<'de> Deserialize<'de> for ObjectExpansion
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 Hash for ObjectExpansion
impl Hash for ObjectExpansion
sourceimpl Ord for ObjectExpansion
impl Ord for ObjectExpansion
sourcefn cmp(&self, other: &ObjectExpansion) -> Ordering
fn cmp(&self, other: &ObjectExpansion) -> Ordering
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<ObjectExpansion> for ObjectExpansion
impl PartialEq<ObjectExpansion> for ObjectExpansion
sourcefn eq(&self, other: &ObjectExpansion) -> bool
fn eq(&self, other: &ObjectExpansion) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourceimpl PartialOrd<ObjectExpansion> for ObjectExpansion
impl PartialOrd<ObjectExpansion> for ObjectExpansion
sourcefn partial_cmp(&self, other: &ObjectExpansion) -> Option<Ordering>
fn partial_cmp(&self, other: &ObjectExpansion) -> 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
sourceimpl Serialize for ObjectExpansion
impl Serialize for ObjectExpansion
impl Copy for ObjectExpansion
impl Eq for ObjectExpansion
impl StructuralEq for ObjectExpansion
impl StructuralPartialEq for ObjectExpansion
Auto Trait Implementations
impl RefUnwindSafe for ObjectExpansion
impl Send for ObjectExpansion
impl Sync for ObjectExpansion
impl Unpin for ObjectExpansion
impl UnwindSafe for ObjectExpansion
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