Struct tar_no_std::ArchiveEntry
source · [−]pub struct ArchiveEntry<'a> { /* private fields */ }Expand description
Describes an entry in an archive. Currently only supports files but no directories.
Implementations
sourceimpl<'a> ArchiveEntry<'a>
impl<'a> ArchiveEntry<'a>
pub const fn new(filename: ArrayString<100>, data: &'a [u8]) -> Self
sourcepub const fn filename(&self) -> ArrayString<100>
pub const fn filename(&self) -> ArrayString<100>
Filename of the entry. Max 99 characters.
sourcepub fn data_as_str(&self) -> Result<&'a str, Utf8Error>
pub fn data_as_str(&self) -> Result<&'a str, Utf8Error>
Data of the file as string slice, if data is valid UTF-8.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for ArchiveEntry<'a>
impl<'a> Send for ArchiveEntry<'a>
impl<'a> Sync for ArchiveEntry<'a>
impl<'a> Unpin for ArchiveEntry<'a>
impl<'a> UnwindSafe for ArchiveEntry<'a>
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