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 for LiteralData
impl PartialEq 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 ==
.source§impl Serialize for LiteralData
impl Serialize for LiteralData
source§impl TryFrom<Packet> for LiteralData
impl TryFrom<Packet> for LiteralData
impl Eq for LiteralData
impl StructuralPartialEq for LiteralData
Auto Trait Implementations§
impl Freeze for LiteralData
impl RefUnwindSafe for LiteralData
impl Send for LiteralData
impl Sync for LiteralData
impl Unpin for LiteralData
impl UnwindSafe for LiteralData
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