pub struct Certificate {
pub public_key: [u8; 32],
pub valid_from: OffsetDateTime,
pub valid_to: OffsetDateTime,
pub signature: [u8; 64],
pub domain_or_ip: String,
}
Expand description
A certificate
§Fields
public_key
- the public key of the certificate (32 bytes)valid_from
- the date the certificate is valid from (4 bytes, Plabble timestamp)valid_to
- the date the certificate is valid to (4 bytes, Plabble timestamp)signature
- the signature of the certificate (64 bytes)domain_or_ip
- the domain or IP address the certificate is from
Fields§
§public_key: [u8; 32]
§valid_from: OffsetDateTime
§valid_to: OffsetDateTime
§signature: [u8; 64]
§domain_or_ip: String
Trait Implementations§
Source§impl Debug for Certificate
impl Debug for Certificate
Source§impl Serializable for Certificate
impl Serializable for Certificate
Source§fn from_bytes(
data: &[u8],
_: Option<SerializationInfo>,
) -> Result<Self, SerializationError>where
Self: Sized,
fn from_bytes(
data: &[u8],
_: Option<SerializationInfo>,
) -> Result<Self, SerializationError>where
Self: Sized,
Deserializes the data from a vector of bytes. Read more
Auto Trait Implementations§
impl Freeze for Certificate
impl RefUnwindSafe for Certificate
impl Send for Certificate
impl Sync for Certificate
impl Unpin for Certificate
impl UnwindSafe for Certificate
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more