pub struct GitObject {
pub name: String,
pub obj_type: GitObjectType,
pub children: Vec<GitObject>,
pub expanded: bool,
}Fields§
§name: String§obj_type: GitObjectType§children: Vec<GitObject>§expanded: boolImplementations§
Source§impl GitObject
impl GitObject
pub fn new_category(name: &str) -> Self
pub fn new_filesystem_folder(path: PathBuf, is_educational: bool) -> Self
pub fn new_filesystem_file(path: PathBuf) -> Self
pub fn new_pack_folder(pack_group: PackGroup) -> Self
pub fn new_pack_file(file_type: String, path: PathBuf) -> Self
pub fn new_ref(path: PathBuf) -> Self
pub fn new_parsed_loose_object(parsed_object: LooseObject) -> Self
pub fn add_child(&mut self, child: Self)
Sourcepub fn restore_state_from(&mut self, old_tree: &[GitObject])
pub fn restore_state_from(&mut self, old_tree: &[GitObject])
Restore expansion and loading state from another GitObject tree
Sourcepub fn load_folder_contents(&mut self) -> Result<(), String>
pub fn load_folder_contents(&mut self) -> Result<(), String>
Load the contents of a filesystem folder on demand
pub fn format_time_ago(time: &SystemTime) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GitObject
impl RefUnwindSafe for GitObject
impl Send for GitObject
impl Sync for GitObject
impl Unpin for GitObject
impl UnsafeUnpin for GitObject
impl UnwindSafe for GitObject
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more