[][src]Struct libknox::Entry

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

Fields

attributes: HashMap<String, Attribute>unknown_fields: UnknownFieldscached_size: CachedSize

Methods

impl Entry[src]

pub fn new() -> Entry[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_attributes(&self) -> &HashMap<String, Attribute>[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 PartialEq<Entry> for Entry[src]

impl Default for Entry[src]

impl Clone for Entry[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Entry[src]

impl Message for Entry[src]

fn write_to(&self, os: &mut CodedOutputStream) -> Result<(), ProtobufError>[src]

Write the message to the stream. Read more

fn write_length_delimited_to(
    &self,
    os: &mut CodedOutputStream
) -> Result<(), ProtobufError>
[src]

Write the message to the stream prepending the message with message length encoded as varint. Read more

fn write_length_delimited_to_vec(
    &self,
    vec: &mut Vec<u8>
) -> Result<(), ProtobufError>
[src]

Write the message to the vec, prepend the message with message length encoded as varint. Read more

fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>[src]

Update this message object with fields read from given stream.

fn check_initialized(&self) -> Result<(), ProtobufError>[src]

Check if all required fields of this object are initialized.

fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>[src]

Write the message to the writer.

fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), ProtobufError>[src]

Write the message to bytes vec.

fn write_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>[src]

Write the message to bytes vec.

fn write_length_delimited_to_writer(
    &self,
    w: &mut dyn Write
) -> Result<(), ProtobufError>
[src]

Write the message to the writer, prepend the message with message length encoded as varint. Read more

fn write_length_delimited_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>[src]

Write the message to the bytes vec, prepend the message with message length encoded as varint. Read more

fn type_id(&self) -> TypeId[src]

Get type id for downcasting.

impl Clear for Entry[src]

impl ProtobufValue for Entry[src]

fn as_any(&self) -> &(dyn Any + 'static)[src]

fn is_non_zero(&self) -> bool[src]

fn as_ref_copy(&self) -> ProtobufValueRef<'static>[src]

Auto Trait Implementations

impl Send for Entry

impl Sync for Entry

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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<Src, Dst> ValueInto for Src where
    Dst: ValueFrom<Src>, 

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

The error type produced by a failed conversion.

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

type Err = NoError

The error type produced by a failed conversion.

impl<Src> ValueFrom for Src

type Err = NoError

The error type produced by a failed conversion.

impl<Dst, Src, Scheme> ApproxInto 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, Dst> ConvAsUtil for T

fn approx(self) -> Result<Dst, Self::Err> where
    Self: ApproxInto<Dst, DefaultApprox>, 

Approximate the subject with the default scheme.

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
    Scheme: ApproxScheme,
    Self: ApproxInto<Dst, Scheme>, 

Approximate the subject with a specific scheme.

impl<T> ConvUtil for T

fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
    Self: ApproxInto<Dst, DefaultApprox>, 

Approximate the subject to a given type with the default scheme.

fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
    Scheme: ApproxScheme,
    Self: ApproxInto<Dst, Scheme>, 

Approximate the subject to a given type with a specific scheme.

fn into_as<Dst>(self) -> Dst where
    Self: Into<Dst>, 

Convert the subject to a given type.

fn try_as<Dst>(self) -> Result<Dst, Self::Err> where
    Self: TryInto<Dst>, 

Attempt to convert the subject to a given type.

fn value_as<Dst>(self) -> Result<Dst, Self::Err> where
    Self: ValueInto<Dst>, 

Attempt a value conversion of the subject to a given type.

impl<Src> TryFrom for Src

type Err = NoError

The error type produced by a failed conversion.

impl<Src, Dst> TryInto for Src where
    Dst: TryFrom<Src>, 

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

The error type produced by a failed conversion.