[][src]Struct keepass::Group

pub struct Group {
    pub name: String,
    pub child_groups: HashMap<String, Group>,
    pub entries: HashMap<String, Entry>,
}

A database group with child groups and entries

Fields

name: String

The name of the group

child_groups: HashMap<String, Group>

The list of child groups

entries: HashMap<String, Entry>

The list of entries in this group

Implementations

impl Group[src]

pub fn get(&self, path: &[&str]) -> Option<Node<'_>>[src]

Recursively get a Group or Entry by specifying a path relative to the current Group

use keepass::{Database, Node};
use std::{fs::File, path::Path};

let path = Path::new("tests/resources/test_db_with_password.kdbx");
let db = Database::open(&mut File::open(path).unwrap(), Some("demopass"), None).unwrap();

if let Some(Node::Entry(e)) = db.root.get(&["General", "Sample Entry #2"]) {
    println!("User: {}", e.get_username().unwrap());
}

impl<'a> Group[src]

pub fn iter(&'a self) -> NodeIter<'a>

Notable traits for NodeIter<'a>

impl<'a> Iterator for NodeIter<'a> type Item = Node<'a>;
[src]

Trait Implementations

impl Debug for Group[src]

impl Default for Group[src]

impl Eq for Group[src]

impl<'a> IntoIterator for &'a Group[src]

type Item = Node<'a>

The type of the elements being iterated over.

type IntoIter = NodeIter<'a>

Which kind of iterator are we turning this into?

impl PartialEq<Group> for Group[src]

impl StructuralEq for Group[src]

impl StructuralPartialEq for Group[src]

Auto Trait Implementations

impl RefUnwindSafe for Group

impl Send for Group

impl Sync for Group

impl Unpin for Group

impl UnwindSafe for Group

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.