pub struct Builder { /* private fields */ }Expand description
Builder for MatterCertificate. Construct via
MatterCertificate::builder().
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn serial(self, serial: Vec<u8>) -> Self
pub fn serial(self, serial: Vec<u8>) -> Self
Set the certificate serial number (1..=20 raw bytes per spec §6.5.1).
Sourcepub fn issuer(self, dn: DistinguishedName) -> Self
pub fn issuer(self, dn: DistinguishedName) -> Self
Set the issuer DN.
Sourcepub fn subject(self, dn: DistinguishedName) -> Self
pub fn subject(self, dn: DistinguishedName) -> Self
Set the subject DN.
Sourcepub fn validity(self, not_before: MatterTime, not_after: MatterTime) -> Self
pub fn validity(self, not_before: MatterTime, not_after: MatterTime) -> Self
Set the validity window.
Sourcepub fn public_key(self, pk: PublicKey) -> Self
pub fn public_key(self, pk: PublicKey) -> Self
Set the subject’s EC P-256 public key.
Sourcepub fn extensions(self, ext: Extensions) -> Self
pub fn extensions(self, ext: Extensions) -> Self
Set the extensions.
Sourcepub fn build_unsigned(self) -> Result<UnsignedCertificate>
pub fn build_unsigned(self) -> Result<UnsignedCertificate>
Validate that every required field is set and return an
UnsignedCertificate ready to be hashed/signed.
§Errors
Returns Error::MissingBuilderField naming the first missing field, or
Error::FieldValueOutOfRange if the serial number is empty or longer
than the 20-byte maximum required by Matter spec §6.5.1.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
Blanket Implementations§
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