pub enum BlobFilter {
All,
None,
Limit(u64),
Type(ObjectKind),
TreeDepth(u64),
}Expand description
Partial-clone object policies. Explicitly wanted objects are retained.
Variants§
All
Keep the complete selected closure.
None
Omit blobs reached through trees or tags. An explicit blob want wins.
Limit(u64)
Omit blobs of this size or larger, in bytes.
Type(ObjectKind)
Omit every other kind, retaining explicitly wanted objects.
TreeDepth(u64)
Omit trees and blobs at this depth or deeper, from each root tree.
Implementations§
Source§impl BlobFilter
impl BlobFilter
Sourcepub const fn includes(self, info: ObjectInfo, explicitly_wanted: bool) -> bool
pub const fn includes(self, info: ObjectInfo, explicitly_wanted: bool) -> bool
Apply the policy at root-tree depth zero. Use includes_at when an
object is reached below a root tree.
Sourcepub const fn includes_at(
self,
info: ObjectInfo,
explicitly_wanted: bool,
tree_depth: u32,
) -> bool
pub const fn includes_at( self, info: ObjectInfo, explicitly_wanted: bool, tree_depth: u32, ) -> bool
Apply the policy at the minimum zero-based tree distance. Explicitly requested objects bypass filtering; commits and tags have no tree depth.
Sourcepub const fn follows_tree(self, tree_depth: u32) -> bool
pub const fn follows_tree(self, tree_depth: u32) -> bool
A tree at the exclusion depth contributes no children, including when the tree itself is retained as an explicit want.
Trait Implementations§
Source§impl Clone for BlobFilter
impl Clone for BlobFilter
Source§fn clone(&self) -> BlobFilter
fn clone(&self) -> BlobFilter
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 moreimpl Copy for BlobFilter
Source§impl Debug for BlobFilter
impl Debug for BlobFilter
Source§impl Default for BlobFilter
impl Default for BlobFilter
Source§fn default() -> BlobFilter
fn default() -> BlobFilter
Returns the “default value” for a type. Read more
impl Eq for BlobFilter
Source§impl PartialEq for BlobFilter
impl PartialEq for BlobFilter
impl StructuralPartialEq for BlobFilter
Auto Trait Implementations§
impl Freeze for BlobFilter
impl RefUnwindSafe for BlobFilter
impl Send for BlobFilter
impl Sync for BlobFilter
impl Unpin for BlobFilter
impl UnsafeUnpin for BlobFilter
impl UnwindSafe for BlobFilter
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