pub struct ProjectScope { /* private fields */ }Expand description
The ledger hashes and sessions that belong to one project.
Implementations§
Source§impl ProjectScope
impl ProjectScope
Sourcepub fn for_project(project: &Path) -> Self
pub fn for_project(project: &Path) -> Self
The scope of project over every saved session (cached briefly: the
dashboard reads several figures per page).
Sourcepub fn from_sessions<'a>(
project: &Path,
sessions: impl Iterator<Item = (&'a str, &'a str)>,
) -> Self
pub fn from_sessions<'a>( project: &Path, sessions: impl Iterator<Item = (&'a str, &'a str)>, ) -> Self
The scope of project over (session id, session folder) pairs.
Sourcepub fn project(&self) -> &Path
pub fn project(&self) -> &Path
The project folder (canonical): the key of everything derived from this scope.
Sourcepub fn repo_hashes(&self) -> Vec<String>
pub fn repo_hashes(&self) -> Vec<String>
The ledger folder hashes of the project, sorted.
pub fn holds_event(&self, event: &SavingsEvent) -> bool
Sourcepub fn holds(&self, repo_hash: &str, session: Option<&str>) -> bool
pub fn holds(&self, repo_hash: &str, session: Option<&str>) -> bool
Whether a record from the folder hashed repo_hash in session belongs here.
Sourcepub fn holds_session(&self, session: Option<&str>) -> bool
pub fn holds_session(&self, session: Option<&str>) -> bool
Whether an audit entry of session belongs here; an entry without a
session cannot be placed in any one project.
Trait Implementations§
Source§impl Clone for ProjectScope
impl Clone for ProjectScope
Source§impl Debug for ProjectScope
impl Debug for ProjectScope
Source§impl Default for ProjectScope
impl Default for ProjectScope
impl Eq for ProjectScope
Source§impl PartialEq for ProjectScope
impl PartialEq for ProjectScope
impl StructuralPartialEq for ProjectScope
Auto Trait Implementations§
impl Freeze for ProjectScope
impl RefUnwindSafe for ProjectScope
impl Send for ProjectScope
impl Sync for ProjectScope
impl Unpin for ProjectScope
impl UnsafeUnpin for ProjectScope
impl UnwindSafe for ProjectScope
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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