[][src]Struct libknox::Entry

pub struct Entry {
    pub attributes: HashMap<String, Attribute>,
    pub totp: SingularPtrField<TotpConfig>,
    pub unknown_fields: UnknownFields,
    pub cached_size: CachedSize,
}

Fields

attributes: HashMap<String, Attribute>totp: SingularPtrField<TotpConfig>unknown_fields: UnknownFieldscached_size: CachedSize

Methods

impl Entry[src]

pub fn new() -> Entry[src]

pub fn get_attributes(&self) -> &HashMap<String, Attribute>[src]

pub fn clear_attributes(&mut self)[src]

pub fn set_attributes(&mut self, v: HashMap<String, Attribute>)[src]

pub fn mut_attributes(&mut self) -> &mut HashMap<String, Attribute>[src]

pub fn take_attributes(&mut self) -> HashMap<String, Attribute>[src]

pub fn get_totp(&self) -> &TotpConfig[src]

pub fn clear_totp(&mut self)[src]

pub fn has_totp(&self) -> bool[src]

pub fn set_totp(&mut self, v: TotpConfig)[src]

pub fn mut_totp(&mut self) -> &mut TotpConfig[src]

pub fn take_totp(&mut self) -> TotpConfig[src]

impl Entry[src]

pub fn read<P>(handle: &VaultContext, path: P) -> Result<Entry, Box<dyn Error>> where
    P: AsRef<Path>, 
[src]

Retrieve and decrypt an entry.

This function returns a decrypted Entry from its virtual path.

Arguments

  • path: - a physical path to an Entry. This will be expanded to the real filesystem file backing the Entry.

pub fn add_attribute(&mut self, key: &str, value: &str)[src]

Add a standard string attribute to an Entry.

pub fn add_confidential_attribute(&mut self, key: &str, value: &str)[src]

Add a confidential string attribute to an Entry.

A confidential attribute is represented by a boolean value and should be used by implemntations to prevent automatic priting of the value to the console.

pub fn add_file_attribute(&mut self, key: &str, value: &[u8])[src]

Adds a file attribute to an Entry.

A file attribute can contain the raw content of a filesystem file (string or binary) and therefore will be encoded differently that string attributes.

Trait Implementations

impl Clear for Entry[src]

impl Clone for Entry[src]

impl Debug for Entry[src]

impl Default for Entry[src]

impl<'a> Default for &'a Entry[src]

impl Message for Entry[src]

impl PartialEq<Entry> for Entry[src]

impl ProtobufValue for Entry[src]

impl StructuralPartialEq for Entry[src]

Auto Trait Implementations

impl RefUnwindSafe for Entry

impl Send for Entry

impl Sync for Entry

impl Unpin for Entry

impl UnwindSafe for Entry

Blanket Implementations

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

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
    Scheme: ApproxScheme, 

type Err = NoError

The error type produced by a failed conversion.

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
    Dst: ApproxFrom<Src, Scheme>,
    Scheme: ApproxScheme, 

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.

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

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

impl<T, Dst> ConvAsUtil<Dst> for T

impl<T> ConvUtil for T

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<Src> TryFrom<Src> for Src

type Err = NoError

The error type produced by a failed conversion.

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<Src, Dst> TryInto<Dst> for Src where
    Dst: TryFrom<Src>, 

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.

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.

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

impl<Src> ValueFrom<Src> for Src

type Err = NoError

The error type produced by a failed conversion.

impl<Src, Dst> ValueInto<Dst> for Src where
    Dst: ValueFrom<Src>, 

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.