Struct pgp::packet::LiteralData
source · pub struct LiteralData { /* private fields */ }
Expand description
Literal Data Packet https://tools.ietf.org/html/rfc4880.html#section-5.9
Implementations§
source§impl LiteralData
impl LiteralData
sourcepub fn from_str(file_name: impl Into<BString>, raw_data: &str) -> Self
pub fn from_str(file_name: impl Into<BString>, raw_data: &str) -> Self
Creates a literal data packet from the given string. Normalizes line endings.
sourcepub fn from_bytes(file_name: &BStr, data: &[u8]) -> Self
pub fn from_bytes(file_name: &BStr, data: &[u8]) -> Self
Creates a literal data packet from the given bytes.
sourcepub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
pub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
Parses a LiteralData
packet from the given slice.
pub fn is_binary(&self) -> bool
pub fn data(&self) -> &[u8] ⓘ
Trait Implementations§
source§impl Clone for LiteralData
impl Clone for LiteralData
source§fn clone(&self) -> LiteralData
fn clone(&self) -> LiteralData
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 LiteralData
impl Debug for LiteralData
source§impl From<LiteralData> for Packet
impl From<LiteralData> for Packet
source§fn from(other: LiteralData) -> Packet
fn from(other: LiteralData) -> Packet
Converts to this type from the input type.
source§impl PacketTrait for LiteralData
impl PacketTrait for LiteralData
source§impl PartialEq<LiteralData> for LiteralData
impl PartialEq<LiteralData> for LiteralData
source§fn eq(&self, other: &LiteralData) -> bool
fn eq(&self, other: &LiteralData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.