Struct c509_certificate::attributes::attribute::Attribute
source · pub struct Attribute {
registered_oid: C509oidRegistered,
multi_value: bool,
value: Vec<AttributeValue>,
}
Expand description
A struct of C509 Attribute
Fields§
§registered_oid: C509oidRegistered
A registered OID of C509 Attribute
.
multi_value: bool
A flag to indicate whether the value can have multiple value.
value: Vec<AttributeValue>
A value of C509 Attribute
can be a vector of text or bytes.
Implementations§
source§impl Attribute
impl Attribute
sourcepub fn add_value(&mut self, value: AttributeValue)
pub fn add_value(&mut self, value: AttributeValue)
Add a value to Attribute
.
sourcepub(crate) fn get_registered_oid(&self) -> &C509oidRegistered
pub(crate) fn get_registered_oid(&self) -> &C509oidRegistered
Get the registered OID of Attribute
.
sourcepub(crate) fn get_value(&self) -> &Vec<AttributeValue>
pub(crate) fn get_value(&self) -> &Vec<AttributeValue>
Get the value of Attribute
.
sourcepub(crate) fn set_pen_supported(self) -> Self
pub(crate) fn set_pen_supported(self) -> Self
Set whether Attribute
can be PEN encoded.
sourcepub(crate) fn set_multi_value(self) -> Self
pub(crate) fn set_multi_value(self) -> Self
Set whether Attribute
can have multiple value.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Attribute
impl<'de> Deserialize<'de> for Attribute
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)