pub struct RepoCheckoutFilter(_);
Expand description

A filter callback to decide which files to checkout from a Repo. The function is called for every directory and file in the dirtree.

Arguments

  • repo - the Repo that is being checked out
  • path - the path of the current file, as an absolute path rooted at the commit’s root. The root directory is ‘/’, a subdir would be ‘/subdir’ etc.
  • stat - the metadata of the current file

Return Value

The return value determines whether the current file is checked out or skipped.

Implementations§

source§

impl RepoCheckoutFilter

source

pub fn new<F>(closure: F) -> Option<RepoCheckoutFilter>where F: Fn(&Repo, &Path, &stat) -> RepoCheckoutFilterResult + 'static,

Wrap a closure for use as a filter function.

Return Value

The return value is always Some containing the value. It simply comes pre-wrapped for your convenience.

Trait Implementations§

source§

impl FromGlibPtrNone<*mut c_void> for &RepoCheckoutFilter

source§

unsafe fn from_glib_none(ptr: gpointer) -> Self

Safety Read more
source§

impl<'a> ToGlibPtr<'a, *mut c_void> for RepoCheckoutFilter

§

type Storage = ()

source§

fn to_glib_none(&'a self) -> Stash<'_, gpointer, Self>

Transfer: none. Read more
source§

fn to_glib_container(&'a self) -> Stash<'a, P, Self>

Transfer: container. Read more
source§

fn to_glib_full(&self) -> P

Transfer: full. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.