Skip to main content

Group

Struct Group 

Source
pub struct Group { /* private fields */ }
Expand description

A group or folder of password entries and child groups

Implementations§

Source§

impl Group

Source

pub fn new<S: ToString>(name: S) -> Group

Create a new group with the given name

Source

pub fn uuid(&self) -> Uuid

Identifier for this group

Source

pub fn set_uuid(&mut self, uuid: Uuid)

Set identifier for this group

Source

pub fn name(&self) -> &str

Display name for this group

Source

pub fn set_name<S: ToString>(&mut self, name: S)

Set display name for this group

Source

pub fn add_entry(&mut self, entry: Entry)

Add a new entry to this group

Source

pub fn remove_entry(&mut self, uuid: Uuid) -> Option<Entry>

Remove an entry by its UUID

This is a no-op if the no direct child of this group has the given UUID

Source

pub fn add_group(&mut self, group: Group)

Add a new child group to this group

Source

pub fn remove_group(&mut self, uuid: Uuid) -> Option<Group>

Remove an child group by its UUID

This is a no-op if the no direct child of this group has the given UUID

Source

pub fn groups(&self) -> impl Iterator<Item = &Group>

Iterate through all the direct child groups of this group

Source

pub fn groups_mut(&mut self) -> impl Iterator<Item = &mut Group>

Iterate mutably through all the direct child groups of this group

Source

pub fn group_count(&self) -> usize

Count of direct child groups of this group

Source

pub fn entry_count(&self) -> usize

Count of direct entries of this group

Source

pub fn entries(&self) -> impl Iterator<Item = &Entry>

Iterate through all the direct entries of this group

Source

pub fn entries_mut(&mut self) -> impl Iterator<Item = &mut Entry>

Iterate mutably through all the direct entries of this group

Source

pub fn recursive_entries<'a>(&'a self) -> Box<dyn Iterator<Item = &Entry> + 'a>

Iterator through all entries in this group or children

Source

pub fn recursive_entries_mut<'a>( &'a mut self, ) -> Box<dyn Iterator<Item = &mut Entry> + 'a>

Mutable Iterator through all entries in this group or children

Source

pub fn recursive_groups<'a>(&'a self) -> Box<dyn Iterator<Item = &Group> + 'a>

Iterator through all child groups of this group

Source

pub fn find_group<F: FnMut(&Group) -> bool>(&self, f: F) -> Option<&Group>

Find a group in this group’s children or it’s children’s children

Source

pub fn find_group_mut<F: FnMut(&Group) -> bool>( &mut self, f: F, ) -> Option<&mut Group>

Find a mutable group in this group’s children or it’s children’s children

Source

pub fn find_entry<F: FnMut(&Entry) -> bool>(&self, f: F) -> Option<&Entry>

Find a entry in this group’s children or it’s children’s children

Source

pub fn find_entry_mut<F: FnMut(&Entry) -> bool>( &mut self, f: F, ) -> Option<&mut Entry>

Find a mutable entry in this group’s children or it’s children’s children

Source

pub fn times(&self) -> &Times

Audit times for this group

Source

pub fn times_mut(&mut self) -> &mut Times

Mutable audit times for this group

Trait Implementations§

Source§

impl Clone for Group

Source§

fn clone(&self) -> Group

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Group

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Group

Source§

fn default() -> Group

Returns the “default value” for a type. Read more
Source§

impl Eq for Group

Source§

impl PartialEq for Group

Source§

fn eq(&self, other: &Group) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Group

Auto Trait Implementations§

§

impl Freeze for Group

§

impl RefUnwindSafe for Group

§

impl Send for Group

§

impl Sync for Group

§

impl Unpin for Group

§

impl UnsafeUnpin for Group

§

impl UnwindSafe for Group

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V