pub struct CustomExtension { /* private fields */ }展开描述
证书的一个自定义扩展,定义见 RFC 5280
实现§
Source§impl CustomExtension
impl CustomExtension
Sourcepub fn new_acme_identifier(sha_digest: &[u8]) -> Self
pub fn new_acme_identifier(sha_digest: &[u8]) -> Self
按 RFC 8737 第 3 节 创建用于 ACME TLS-ALPN-01 的 acmeIdentifier 扩展
若传入的 sha_digest 参数不包含 32 字节(256 位),则引发 panic。
Sourcepub fn from_oid_content(oid: &[u64], content: Vec<u8>) -> Self
pub fn from_oid_content(oid: &[u64], content: Vec<u8>) -> Self
使用指定内容创建一个新的自定义扩展
Sourcepub fn set_criticality(&mut self, criticality: bool)
pub fn set_criticality(&mut self, criticality: bool)
设置该扩展的 criticality 标志。
Sourcepub fn criticality(&self) -> bool
pub fn criticality(&self) -> bool
获取该扩展的 criticality 标志。
Sourcepub fn oid_components(&self) -> impl Iterator<Item = u64> + '_
pub fn oid_components(&self) -> impl Iterator<Item = u64> + '_
获取该扩展的 OID 组成部分,以 u64 形式给出
Trait 实现§
Source§impl Clone for CustomExtension
impl Clone for CustomExtension
Source§fn clone(&self) -> CustomExtension
fn clone(&self) -> CustomExtension
返回值的副本。 更多信息
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. 更多信息Source§impl Debug for CustomExtension
impl Debug for CustomExtension
Source§impl Hash for CustomExtension
impl Hash for CustomExtension
Source§impl PartialEq for CustomExtension
impl PartialEq for CustomExtension
impl Eq for CustomExtension
impl StructuralPartialEq for CustomExtension
自动 Trait 实现§
impl Freeze for CustomExtension
impl RefUnwindSafe for CustomExtension
impl Send for CustomExtension
impl Sync for CustomExtension
impl Unpin for CustomExtension
impl UnsafeUnpin for CustomExtension
impl UnwindSafe for CustomExtension
Blanket 实现§
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. 更多信息