pub struct Smimea<'a> {
pub usage: TlsaCertUsage,
pub selector: TlsaSelector,
pub matching_type: TlsaMatchingType,
pub data: &'a [u8],
}Expand description
SMIMEA record data: an S/MIME certificate association, in the
TLSA format (RFC 8162 §2).
Fields§
§usage: TlsaCertUsageHow the association is used (RFC 6698 §2.1.1).
selector: TlsaSelectorWhich part of the certificate is matched (RFC 6698 §2.1.2).
matching_type: TlsaMatchingTypeHow the association data is presented (RFC 6698 §2.1.3).
data: &'a [u8]The certificate association data: the rest of the RDATA (RFC 6698 §2.1.4).
Implementations§
Source§impl<'a> Smimea<'a>
impl<'a> Smimea<'a>
Sourcepub const fn new(
usage: TlsaCertUsage,
selector: TlsaSelector,
matching_type: TlsaMatchingType,
data: &'a [u8],
) -> Self
pub const fn new( usage: TlsaCertUsage, selector: TlsaSelector, matching_type: TlsaMatchingType, data: &'a [u8], ) -> Self
Builds the record data from its fields (RFC 6698 §2.1).
Trait Implementations§
Source§impl ComposeRdata for Smimea<'_>
impl ComposeRdata for Smimea<'_>
impl<'a> Copy for Smimea<'a>
impl<'a> Eq for Smimea<'a>
Source§impl<'a> ParseRdata<'a> for Smimea<'a>
impl<'a> ParseRdata<'a> for Smimea<'a>
Source§fn parse_rdata(rdata: &mut WireReader<'a>) -> Result<Self>
fn parse_rdata(rdata: &mut WireReader<'a>) -> Result<Self>
Parses RDATA from
rdata, a reader whose window is exactly the
record’s RDATA (RDLENGTH bytes) but which can still follow
compression pointers into the whole message. Read moreSource§impl ParseRdataText for Smimea<'_>
impl ParseRdataText for Smimea<'_>
Source§fn parse_text<B: OutBuf + ?Sized>(
s: &mut Scanner<'_>,
out: &mut B,
) -> Result<()>
fn parse_text<B: OutBuf + ?Sized>( s: &mut Scanner<'_>, out: &mut B, ) -> Result<()>
<usage> <selector> <matching-type> <data> (RFC 6698 §2.2):
three decimal numbers and the association data in
hexadecimal, which may be split across blanks and lines.
At least one octet is required (empty data has only the
generic form, as in BIND).
Source§fn from_text<'b>(text: &str, buf: &'b mut [u8]) -> Result<Self>where
Self: ParseRdata<'b>,
fn from_text<'b>(text: &str, buf: &'b mut [u8]) -> Result<Self>where
Self: ParseRdata<'b>,
Parses standalone presentation-format RDATA (relative names are
completed with the root; newlines are blanks) into
buf and
returns a view over it. The RFC 3597 generic form
\# <length> <hex> is accepted too. Read moreimpl<'a> StructuralPartialEq for Smimea<'a>
Auto Trait Implementations§
impl<'a> Freeze for Smimea<'a>
impl<'a> RefUnwindSafe for Smimea<'a>
impl<'a> Send for Smimea<'a>
impl<'a> Sync for Smimea<'a>
impl<'a> Unpin for Smimea<'a>
impl<'a> UnsafeUnpin for Smimea<'a>
impl<'a> UnwindSafe for Smimea<'a>
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