Struct trust_dns_proto::rr::rdata::openpgpkey::OPENPGPKEY
source · pub struct OPENPGPKEY { /* private fields */ }
Expand description
The RDATA portion of an OPENPGPKEY resource record contains a single
value consisting of a Transferable Public Key formatted as specified
in [RFC4880].
Implementations§
source§impl OPENPGPKEY
impl OPENPGPKEY
sourcepub fn new(public_key: Vec<u8>) -> Self
pub fn new(public_key: Vec<u8>) -> Self
Creates a new OPENPGPKEY record data.
§Arguments
public_key
- an OpenPGP Transferable Public Key. This will NOT be checked.
sourcepub fn public_key(&self) -> &[u8] ⓘ
pub fn public_key(&self) -> &[u8] ⓘ
The public key. This should be an OpenPGP Transferable Public Key, but this is not guaranteed.
Trait Implementations§
source§impl BinEncodable for OPENPGPKEY
impl BinEncodable for OPENPGPKEY
source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>
Write the type to the stream
source§impl Clone for OPENPGPKEY
impl Clone for OPENPGPKEY
source§fn clone(&self) -> OPENPGPKEY
fn clone(&self) -> OPENPGPKEY
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 OPENPGPKEY
impl Debug for OPENPGPKEY
source§impl Display for OPENPGPKEY
impl Display for OPENPGPKEY
Parse the RData from a set of tokens.
2.3. The OPENPGPKEY RDATA Presentation Format
The RDATA Presentation Format, as visible in Zone Files [RFC1035],
consists of a single OpenPGP Transferable Public Key as defined in
Section 11.1 of [RFC4880] encoded in base64 as defined in Section 4
of [RFC4648].
source§impl Hash for OPENPGPKEY
impl Hash for OPENPGPKEY
source§impl PartialEq for OPENPGPKEY
impl PartialEq for OPENPGPKEY
source§fn eq(&self, other: &OPENPGPKEY) -> bool
fn eq(&self, other: &OPENPGPKEY) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RecordData for OPENPGPKEY
impl RecordData for OPENPGPKEY
source§fn try_from_rdata(data: RData) -> Result<Self, RData>
fn try_from_rdata(data: RData) -> Result<Self, RData>
Attempts to convert to this RecordData from the RData type, if it is not the correct type the original is returned
source§fn try_borrow(data: &RData) -> Option<&Self>
fn try_borrow(data: &RData) -> Option<&Self>
Attempts to borrow this RecordData from the RData type, if it is not the correct type the original is returned
source§fn record_type(&self) -> RecordType
fn record_type(&self) -> RecordType
Get the associated RecordType for the RecordData
source§fn into_rdata(self) -> RData
fn into_rdata(self) -> RData
Converts this RecordData into generic RecordData
impl Eq for OPENPGPKEY
impl StructuralPartialEq for OPENPGPKEY
Auto Trait Implementations§
impl Freeze for OPENPGPKEY
impl RefUnwindSafe for OPENPGPKEY
impl Send for OPENPGPKEY
impl Sync for OPENPGPKEY
impl Unpin for OPENPGPKEY
impl UnwindSafe for OPENPGPKEY
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)