[][src]Struct libknox::Attribute

pub struct Attribute {
    pub value: String,
    pub bytes_value: Vec<u8>,
    pub confidential: bool,
    pub file: bool,
    pub unknown_fields: UnknownFields,
    pub cached_size: CachedSize,
}

Fields

value: Stringbytes_value: Vec<u8>confidential: boolfile: boolunknown_fields: UnknownFieldscached_size: CachedSize

Methods

impl Attribute[src]

pub fn new() -> Attribute[src]

pub fn clear_value(&mut self)[src]

pub fn set_value(&mut self, v: String)[src]

pub fn mut_value(&mut self) -> &mut String[src]

pub fn take_value(&mut self) -> String[src]

pub fn get_value(&self) -> &str[src]

pub fn clear_bytes_value(&mut self)[src]

pub fn set_bytes_value(&mut self, v: Vec<u8>)[src]

pub fn mut_bytes_value(&mut self) -> &mut Vec<u8>[src]

pub fn take_bytes_value(&mut self) -> Vec<u8>[src]

pub fn get_bytes_value(&self) -> &[u8][src]

pub fn clear_confidential(&mut self)[src]

pub fn set_confidential(&mut self, v: bool)[src]

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

pub fn clear_file(&mut self)[src]

pub fn set_file(&mut self, v: bool)[src]

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

impl Attribute[src]

pub fn value(&self) -> AttributeValue[src]

Retrieve an Attribute's value.

Extracts a value from an attribute, and return an enum that allows to abstract over the actuel storage representation.

Trait Implementations

impl PartialEq<Attribute> for Attribute[src]

impl Clone for Attribute[src]

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

Performs copy-assignment from source. Read more

impl Default for Attribute[src]

impl Debug for Attribute[src]

impl Message for Attribute[src]

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

Write the message to the stream. Read more

default 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

default 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

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

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]

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]

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]

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 Attribute[src]

impl ProtobufValue for Attribute[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

impl Send for Attribute

impl Sync for Attribute

Blanket Implementations

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

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<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

default fn approx(self) -> Result<Dst, Self::Err> where
    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>, 

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>, 

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>, 

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

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

Convert the subject to a given type.

default fn try_as<Dst>(self) -> Result<Dst, Self::Err> where
    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>, 

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.