[−][src]Struct libknox::Entry
Fields
attributes: HashMap<String, Attribute>
unknown_fields: UnknownFields
cached_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]
P: AsRef<Path>,
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 theEntry
.
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 Clone for Entry
[src]
fn clone(&self) -> Entry
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Entry
[src]
impl Debug for Entry
[src]
impl Message for Entry
[src]
fn is_initialized(&self) -> bool
[src]
fn merge_from(&mut self, is: &mut CodedInputStream) -> ProtobufResult<()>
[src]
fn compute_size(&self) -> u32
[src]
fn write_to_with_cached_sizes(
&self,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
[src]
&self,
os: &mut CodedOutputStream
) -> ProtobufResult<()>
fn get_cached_size(&self) -> u32
[src]
fn get_unknown_fields(&self) -> &UnknownFields
[src]
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
[src]
fn as_any(&self) -> &dyn Any
[src]
fn as_any_mut(&mut self) -> &mut dyn Any
[src]
fn into_any(self: Box<Self>) -> Box<dyn Any>
[src]
fn descriptor(&self) -> &'static MessageDescriptor
[src]
fn new() -> Entry
[src]
fn descriptor_static() -> &'static MessageDescriptor
[src]
fn default_instance() -> &'static Entry
[src]
default fn write_to(
&self,
os: &mut CodedOutputStream
) -> Result<(), ProtobufError>
[src]
&self,
os: &mut CodedOutputStream
) -> Result<(), ProtobufError>
Write the message to the stream. Read more
default fn write_length_delimited_to(
&self,
os: &mut CodedOutputStream
) -> Result<(), ProtobufError>
[src]
&self,
os: &mut CodedOutputStream
) -> Result<(), ProtobufError>
Write the message to the stream prepending the message with message length encoded as varint. Read more
default fn write_length_delimited_to_vec(
&self,
vec: &mut Vec<u8>
) -> Result<(), ProtobufError>
[src]
&self,
vec: &mut Vec<u8>
) -> Result<(), ProtobufError>
Write the message to the vec, prepend the message with message length encoded as varint. Read more
default fn merge_from_bytes(
&mut self,
bytes: &[u8]
) -> Result<(), ProtobufError>
[src]
&mut self,
bytes: &[u8]
) -> Result<(), ProtobufError>
Update this message object with fields read from given stream.
default fn check_initialized(&self) -> Result<(), ProtobufError>
[src]
Check if all required fields of this object are initialized.
default fn write_to_writer(
&self,
w: &mut dyn Write
) -> Result<(), ProtobufError>
[src]
&self,
w: &mut dyn Write
) -> Result<(), ProtobufError>
Write the message to the writer.
default fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), ProtobufError>
[src]
Write the message to bytes vec.
default fn write_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
[src]
Write the message to bytes vec.
default fn write_length_delimited_to_writer(
&self,
w: &mut dyn Write
) -> Result<(), ProtobufError>
[src]
&self,
w: &mut dyn Write
) -> Result<(), ProtobufError>
Write the message to the writer, prepend the message with message length encoded as varint. Read more
default fn write_length_delimited_to_bytes(
&self
) -> Result<Vec<u8>, ProtobufError>
[src]
&self
) -> Result<Vec<u8>, ProtobufError>
Write the message to the bytes vec, prepend the message with message length encoded as varint. Read more
default fn type_id(&self) -> TypeId
[src]
Get type id for downcasting.
impl Clear for Entry
[src]
impl ProtobufValue for Entry
[src]
fn as_ref(&self) -> ProtobufValueRef
[src]
default fn as_any(&self) -> &(dyn Any + 'static)
[src]
default fn is_non_zero(&self) -> bool
[src]
default fn as_ref_copy(&self) -> ProtobufValueRef<'static>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<Src, Dst> ValueInto for Src where
Dst: ValueFrom<Src>,
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
impl<Src, Scheme> ApproxFrom for Src where
Scheme: ApproxScheme,
Scheme: ApproxScheme,
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
impl<Src> ValueFrom for Src
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
impl<Dst, Src, Scheme> ApproxInto for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
impl<T, Dst> ConvAsUtil for T
default fn approx(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject with the default scheme.
default fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Approximate the subject with a specific scheme.
impl<T> ConvUtil for T
default fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
default fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Approximate the subject to a given type with a specific scheme.
default fn into_as<Dst>(self) -> Dst where
Self: Into<Dst>,
Self: Into<Dst>,
Convert the subject to a given type.
default fn try_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: TryInto<Dst>,
Self: TryInto<Dst>,
Attempt to convert the subject to a given type.
default fn value_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ValueInto<Dst>,
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.
fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>
impl<Src, Dst> TryInto for Src where
Dst: TryFrom<Src>,
Dst: TryFrom<Src>,