Expand description
Other certificate format.
OtherCertificateFormat ::= SEQUENCE {
otherCertFormat OBJECT IDENTIFIER,
otherCert ANY DEFINED BY otherCertFormat }
Fields§
§other_cert_format: Oid§other_cert: Option<()>Implementations§
source§impl OtherCertificateFormat
impl OtherCertificateFormat
sourcepub fn take_from<S: Source>(
cons: &mut Constructed<'_, S>
) -> Result<Self, DecodeError<S::Error>>
pub fn take_from<S: Source>(
cons: &mut Constructed<'_, S>
) -> Result<Self, DecodeError<S::Error>>
Examples found in repository?
src/asn1/rfc5652.rs (line 1189)
1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199
pub fn take_opt_from<S: Source>(
cons: &mut Constructed<S>,
) -> Result<Option<Self>, DecodeError<S::Error>> {
cons.take_opt_constructed_if(Tag::CTX_0, |cons| -> Result<(), DecodeError<S::Error>> {
Err(cons.content_err("ExtendedCertificate parsing not implemented"))
})?;
cons.take_opt_constructed_if(Tag::CTX_1, |cons| -> Result<(), DecodeError<S::Error>> {
Err(cons.content_err("AttributeCertificateV1 parsing not implemented"))
})?;
// TODO these first 2 need methods that parse an already entered SEQUENCE.
if let Some(certificate) = cons
.take_opt_constructed_if(Tag::CTX_2, |cons| AttributeCertificateV2::take_from(cons))?
{
Ok(Some(Self::AttributeCertificateV2(Box::new(certificate))))
} else if let Some(certificate) = cons
.take_opt_constructed_if(Tag::CTX_3, |cons| OtherCertificateFormat::take_from(cons))?
{
Ok(Some(Self::Other(Box::new(certificate))))
} else if let Some(certificate) =
cons.take_opt_constructed(|_, cons| Certificate::from_sequence(cons))?
{
Ok(Some(Self::Certificate(Box::new(certificate))))
} else {
Ok(None)
}
}Trait Implementations§
source§impl Clone for OtherCertificateFormat
impl Clone for OtherCertificateFormat
source§fn clone(&self) -> OtherCertificateFormat
fn clone(&self) -> OtherCertificateFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for OtherCertificateFormat
impl Debug for OtherCertificateFormat
source§impl PartialEq<OtherCertificateFormat> for OtherCertificateFormat
impl PartialEq<OtherCertificateFormat> for OtherCertificateFormat
source§fn eq(&self, other: &OtherCertificateFormat) -> bool
fn eq(&self, other: &OtherCertificateFormat) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for OtherCertificateFormat
impl StructuralEq for OtherCertificateFormat
impl StructuralPartialEq for OtherCertificateFormat
Auto Trait Implementations§
impl RefUnwindSafe for OtherCertificateFormat
impl Send for OtherCertificateFormat
impl Sync for OtherCertificateFormat
impl Unpin for OtherCertificateFormat
impl UnwindSafe for OtherCertificateFormat
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.