Struct git_event::GitRepoWatchHandler[][src]

pub struct GitRepoWatchHandler {
    pub repo: GitRepo,
    pub state: Option<GitRepoState>,
    pub branch_filter: Option<Vec<String>>,
    pub path_filter: Option<Vec<PathBuf>>,
    pub use_shallow: bool,
    pub poll_freq: Duration,
}

Fields

repo: GitRepostate: Option<GitRepoState>branch_filter: Option<Vec<String>>path_filter: Option<Vec<PathBuf>>use_shallow: boolpoll_freq: Duration

Implementations

impl GitRepoWatchHandler[src]

pub fn new<U: AsRef<str>>(url: U) -> Result<Self>[src]

pub fn with_branch(self, branch: Option<String>) -> Self[src]

Set the current repo branch

pub fn with_commit(self, id: Option<String>) -> Self[src]

Set the current repo commit id. If you’re using with_commit() to build a GitRepoWatcher with new() then use with_commit()` as the end of the chain

pub fn with_credentials(self, creds: Option<GitCredentials>) -> Self[src]

pub fn with_branch_filter(self, branch_list: Option<Vec<String>>) -> Self[src]

pub fn with_path_filter(self, path_list: Option<Vec<PathBuf>>) -> Self[src]

pub fn with_shallow_clone(self, shallow_choice: bool) -> Self[src]

pub fn with_poll_freq(self, frequency: Duration) -> Self[src]

pub fn state(self) -> Option<GitRepoState>[src]

pub async fn update_state(&mut self) -> Result<GitRepoState>[src]

pub fn update_state_sync(&mut self) -> Result<GitRepoState>[src]

pub async fn watch_new_commits<F>(
    &mut self,
    pre_run: bool,
    closure: F
) -> Result<()> where
    F: Fn(GitRepoState), 
[src]

pub fn watch_new_commits_sync<F>(
    &mut self,
    pre_run: bool,
    closure: F
) -> Result<()> where
    F: Fn(GitRepoState), 
[src]

Trait Implementations

impl Clone for GitRepoWatchHandler[src]

impl Debug for GitRepoWatchHandler[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D> OwoColorize for D

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.