[−][src]Struct yasna::models::ObjectIdentifier
A type that represents object identifiers.
This is actually a thin wrapper of Vec<u64>
.
Examples
use yasna::models::ObjectIdentifier; let sha384WithRSAEncryption = ObjectIdentifier::from_slice(& [1, 2, 840, 113549, 1, 1, 12]); println!("{}", sha384WithRSAEncryption);
Methods
impl ObjectIdentifier
[src]
pub fn new(components: Vec<u64>) -> Self
[src]
Constructs a new ObjectIdentifier
from Vec<u64>
.
Examples
use yasna::models::ObjectIdentifier; let pkcs1 = ObjectIdentifier::new( [1, 2, 840, 113549, 1, 1].to_vec()); println!("{}", pkcs1);
pub fn from_slice(components: &[u64]) -> Self
[src]
Constructs a new ObjectIdentifier
from &[u64]
.
Examples
use yasna::models::ObjectIdentifier; let pkcs1 = ObjectIdentifier::from_slice(& [1, 2, 840, 113549, 1, 1]); println!("{}", pkcs1);
pub fn components(&self) -> &Vec<u64>
[src]
Borrows its internal vector of components.
Examples
use yasna::models::ObjectIdentifier; let pkcs1 = ObjectIdentifier::from_slice(& [1, 2, 840, 113549, 1, 1]); let components : &Vec<u64> = pkcs1.components();
pub fn components_mut(&mut self) -> &mut Vec<u64>
[src]
Mutably borrows its internal vector of components.
Examples
use yasna::models::ObjectIdentifier; let mut pkcs1 = ObjectIdentifier::from_slice(& [1, 2, 840, 113549, 1, 1]); let components : &mut Vec<u64> = pkcs1.components_mut();
pub fn into_components(self) -> Vec<u64>
[src]
Extracts its internal vector of components.
Examples
use yasna::models::ObjectIdentifier; let pkcs1 = ObjectIdentifier::from_slice(& [1, 2, 840, 113549, 1, 1]); let mut components : Vec<u64> = pkcs1.into_components();
Trait Implementations
impl BERDecodable for ObjectIdentifier
[src]
fn decode_ber(reader: BERReader) -> ASN1Result<Self>
[src]
impl DEREncodable for ObjectIdentifier
[src]
fn encode_der(&self, writer: DERWriter)
[src]
impl Clone for ObjectIdentifier
[src]
fn clone(&self) -> ObjectIdentifier
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<ObjectIdentifier> for ObjectIdentifier
[src]
fn eq(&self, other: &ObjectIdentifier) -> bool
[src]
fn ne(&self, other: &ObjectIdentifier) -> bool
[src]
impl PartialOrd<ObjectIdentifier> for ObjectIdentifier
[src]
fn partial_cmp(&self, other: &ObjectIdentifier) -> Option<Ordering>
[src]
fn lt(&self, other: &ObjectIdentifier) -> bool
[src]
fn le(&self, other: &ObjectIdentifier) -> bool
[src]
fn gt(&self, other: &ObjectIdentifier) -> bool
[src]
fn ge(&self, other: &ObjectIdentifier) -> bool
[src]
impl Ord for ObjectIdentifier
[src]
fn cmp(&self, other: &ObjectIdentifier) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Returns max if self is greater than max, and min if self is less than min. Otherwise this will return self. Panics if min > max. Read more
impl Eq for ObjectIdentifier
[src]
impl AsRef<[u64]> for ObjectIdentifier
[src]
impl From<Vec<u64>> for ObjectIdentifier
[src]
fn from(components: Vec<u64>) -> ObjectIdentifier
[src]
impl Hash for ObjectIdentifier
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for ObjectIdentifier
[src]
impl Display for ObjectIdentifier
[src]
impl FromStr for ObjectIdentifier
[src]
Auto Trait Implementations
impl Send for ObjectIdentifier
impl Sync for ObjectIdentifier
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
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, 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<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,