[][src]Struct kdbx4::Database

pub struct Database { /* fields omitted */ }

Provides access to a database XML content.

Examples

use kdbx4::{Kdbx4,CompositeKey};

let key = CompositeKey::new(Some("P@ssW0rd"), None::<String>).unwrap();
let db = Kdbx4::open("~/passwords.kdbx", key).unwrap();

assert!(db.entries().len() >= 0);

Methods

impl Database[src]

pub fn entries<'a>(&'a self) -> Vec<Entry<'a>>[src]

Returns all Entrys from database.

Examples

let mut total = 0;

for entry in db.entries() {
  total += 1;
}

pub fn find<'a>(&'a self, title: &'a str) -> Vec<Entry<'a>>[src]

Returns Entrys with title starting with pattern.

Matching is case-insensitive.

Examples

assert_eq!(0, db.find("example.com").len());

Trait Implementations

impl Debug for Database[src]

Auto Trait Implementations

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.