Skip to main content

CleanContext

Struct CleanContext 

Source
pub struct CleanContext<'a> {
Show 14 fields pub root: &'a Path, pub start_files: HashMap<String, Value>, pub all_run_ids: Vec<String>, pub wip_branch_tips: HashMap<String, String>, pub default_branch: String, pub origin_default: Option<String>, pub default_tree: Option<String>, pub origin_default_tree: Option<String>, pub wip_contains_cache: HashMap<String, Vec<String>>, pub merged_cache: HashMap<String, Option<RemovalReason>>, pub branch_contains_calls: usize, pub cherry_pick_set: Option<HashSet<String>>, pub rev_list_cache: HashMap<String, Vec<String>>, pub ancestor_cache: HashMap<(String, String), bool>,
}
Expand description

Context for cleaning a repository, caching metadata to avoid redundant git calls and disk reads.

Fields§

§root: &'a Path§start_files: HashMap<String, Value>§all_run_ids: Vec<String>§wip_branch_tips: HashMap<String, String>§default_branch: String§origin_default: Option<String>§default_tree: Option<String>§origin_default_tree: Option<String>§wip_contains_cache: HashMap<String, Vec<String>>§merged_cache: HashMap<String, Option<RemovalReason>>§branch_contains_calls: usize§cherry_pick_set: Option<HashSet<String>>§rev_list_cache: HashMap<String, Vec<String>>§ancestor_cache: HashMap<(String, String), bool>

Implementations§

Source§

impl<'a> CleanContext<'a>

Source

pub fn new(root: &'a Path) -> Self

Source

pub fn get_cherry_pick_set(&mut self) -> &HashSet<String>

Source

pub fn get_branch_tip(&self, branch_name: &str) -> Option<String>

Source

pub fn is_research_run(&self, id: &str) -> bool

Source

pub fn get_wip_branches_containing(&mut self, tip_sha: &str) -> Vec<String>

Source

pub fn get_children_of(&mut self, id: &str, tip_sha: &str) -> Vec<String>

Source

pub fn is_child_run_merged( &mut self, child: &str, visited: &mut HashSet<String>, ) -> bool

Source

pub fn check_run_merged(&mut self, id: &str) -> Option<RemovalReason>

Source

pub fn find_merged_followup(&mut self, id: &str) -> Option<String>

Source

pub fn check_removable( &mut self, id: &str, older_than_days: u64, ) -> Result<RemovalReason, KeptReason>

Auto Trait Implementations§

§

impl<'a> Freeze for CleanContext<'a>

§

impl<'a> RefUnwindSafe for CleanContext<'a>

§

impl<'a> Send for CleanContext<'a>

§

impl<'a> Sync for CleanContext<'a>

§

impl<'a> Unpin for CleanContext<'a>

§

impl<'a> UnsafeUnpin for CleanContext<'a>

§

impl<'a> UnwindSafe for CleanContext<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.