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
sourceimpl LiteralData
impl LiteralData
sourcepub fn from_str(file_name: &str, raw_data: &str) -> Self
pub fn from_str(file_name: &str, raw_data: &str) -> Self
Creates a literal data packet from the given string. Normalizes line endings.
sourcepub fn from_bytes(file_name: &str, data: &[u8]) -> Self
pub fn from_bytes(file_name: &str, 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]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
Trait Implementations
sourceimpl Clone for LiteralData
impl Clone for LiteralData
sourcefn clone(&self) -> LiteralData
fn clone(&self) -> LiteralData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LiteralData
impl Debug for LiteralData
sourceimpl From<LiteralData> for Packet
impl From<LiteralData> for Packet
sourcefn from(other: LiteralData) -> Packet
fn from(other: LiteralData) -> Packet
Converts to this type from the input type.
sourceimpl PacketTrait for LiteralData
impl PacketTrait for LiteralData
sourceimpl PartialEq<LiteralData> for LiteralData
impl PartialEq<LiteralData> for LiteralData
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &LiteralData) -> bool
fn ne(&self, other: &LiteralData) -> bool
This method tests for !=
.
sourceimpl Serialize for LiteralData
impl Serialize for LiteralData
sourceimpl TryFrom<Packet> for LiteralData
impl TryFrom<Packet> for LiteralData
impl Eq for LiteralData
impl StructuralEq for LiteralData
impl StructuralPartialEq for LiteralData
Auto Trait Implementations
impl RefUnwindSafe for LiteralData
impl Send for LiteralData
impl Sync for LiteralData
impl Unpin for LiteralData
impl UnwindSafe for LiteralData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more