Struct yasna::models::ObjectIdentifier [−][src]
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);
Implementations
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 AsRef<[u64]> for ObjectIdentifier
[src]
impl BERDecodable for ObjectIdentifier
[src]
fn decode_ber(reader: BERReader<'_, '_>) -> ASN1Result<Self>
[src]
impl Clone for ObjectIdentifier
[src]
fn clone(&self) -> ObjectIdentifier
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl DEREncodable for ObjectIdentifier
[src]
fn encode_der(&self, writer: DERWriter<'_>)
[src]
impl Debug for ObjectIdentifier
[src]
impl Display for ObjectIdentifier
[src]
impl Eq for ObjectIdentifier
[src]
impl From<Vec<u64, Global>> for ObjectIdentifier
[src]
fn from(components: Vec<u64>) -> ObjectIdentifier
[src]
impl FromStr for ObjectIdentifier
[src]
type Err = ParseOidError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for ObjectIdentifier
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for ObjectIdentifier
[src]
fn cmp(&self, other: &ObjectIdentifier) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
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]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ObjectIdentifier
[src]
impl StructuralPartialEq for ObjectIdentifier
[src]
Auto Trait Implementations
impl RefUnwindSafe for ObjectIdentifier
impl Send for ObjectIdentifier
impl Sync for ObjectIdentifier
impl Unpin for ObjectIdentifier
impl UnwindSafe for ObjectIdentifier
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,