pub struct Project {
pub name: String,
pub source: ProjectSource,
pub repositories: Vec<Repository>,
}Expand description
A project represents a collection of repositories.
Fields§
§name: StringName of the project.
source: ProjectSourceType of project source.
repositories: Vec<Repository>All repositories in this project.
Implementations§
Source§impl Project
impl Project
Sourcepub fn github_org(organization: impl Into<String>) -> Self
pub fn github_org(organization: impl Into<String>) -> Self
Create a new project for a GitHub organization.
Sourcepub fn github_repo(owner: impl Into<String>, repo: impl Into<String>) -> Self
pub fn github_repo(owner: impl Into<String>, repo: impl Into<String>) -> Self
Create a new project for a single GitHub repository.
Sourcepub fn local_paths(name: impl Into<String>, paths: Vec<PathBuf>) -> Self
pub fn local_paths(name: impl Into<String>, paths: Vec<PathBuf>) -> Self
Create a new project from multiple local paths.
Sourcepub fn expand_content<F>(&mut self, filter_fn: F) -> OpsResult<()>
pub fn expand_content<F>(&mut self, filter_fn: F) -> OpsResult<()>
Expand content for sources matching the filter predicate.
Sourcepub fn total_sources(&self) -> usize
pub fn total_sources(&self) -> usize
Get total count of all sources across repositories.
Sourcepub fn total_size(&self) -> u64
pub fn total_size(&self) -> u64
Get total size of all sources.
Sourcepub fn human_total_size(&self) -> String
pub fn human_total_size(&self) -> String
Get human-readable total size.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Project
impl<'de> Deserialize<'de> for Project
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Project
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnsafeUnpin for Project
impl UnwindSafe for Project
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> FromResponse for Twhere
T: DeserializeOwned,
impl<T> FromResponse for Twhere
T: DeserializeOwned,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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