OwnedRepositoryManager

Struct OwnedRepositoryManager 

Source
pub struct OwnedRepositoryManager {
    pub repo: RepositoryManager,
    /* private fields */
}
Expand description

A repository manager which own full copy of a repo.

This is helpful when you need to perform a full-repo operation, such as ring check on tags, full-repo validation, etc.

Fields§

§repo: RepositoryManager

Implementations§

Source§

impl OwnedRepositoryManager

Source

pub fn new(repo: RepositoryManager) -> RepoResult<Self>

Source

pub fn album(&self, album_id: &Uuid) -> Option<&Album>

Source

pub fn album_path(&self, album_id: &Uuid) -> Option<&Path>

Source

pub fn albums(&self) -> &HashMap<Uuid, Album>

Source

pub fn albums_iter(&self) -> impl Iterator<Item = &Album>

Source

pub fn tag(&self, tag: &TagRef<'_>) -> Option<&Tag>

Source

pub fn tags_iter(&self) -> impl Iterator<Item = &Tag>

Source

pub fn tag_path<'a>(&'a self, tag: &'a TagRef<'_>) -> Option<&'a PathBuf>

Source

pub fn child_tags<'me, 'tag>( &'me self, tag: &TagRef<'tag>, ) -> IndexSet<&'me TagRef<'tag>>
where 'tag: 'me,

Source

pub fn albums_tagged_by<'me, 'tag>( &'me self, tag: &'me TagRef<'tag>, ) -> Option<&'me Vec<Uuid>>
where 'tag: 'me,

Source

pub fn check_tags_loop<'me, 'tag>(&'me self) -> Option<Vec<&'me TagRef<'tag>>>
where 'me: 'tag,

Trait Implementations§

Source§

impl Drop for OwnedRepositoryManager

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.