pub struct TarRegularFile<'a, R> { /* private fields */ }Expand description
Implementations§
Source§impl<'a, R: AsyncRead + 'a> TarRegularFile<'a, R>
impl<'a, R: AsyncRead + 'a> TarRegularFile<'a, R>
Sourcepub fn new<N: Into<Box<str>>>(
path_name: N,
size: u64,
inner: R,
) -> TarRegularFile<'a, R>
pub fn new<N: Into<Box<str>>>( path_name: N, size: u64, inner: R, ) -> TarRegularFile<'a, R>
Build a regular-file entry with the provided body reader.
size must match the exact number of bytes that inner will yield.
Sourcepub fn mtime(&self) -> SystemTime
pub fn mtime(&self) -> SystemTime
Return the modification time stored for this entry.
Sourcepub fn atime(&self) -> Option<SystemTime>
pub fn atime(&self) -> Option<SystemTime>
Return the access time stored for this entry, if present.
Sourcepub fn ctime(&self) -> Option<SystemTime>
pub fn ctime(&self) -> Option<SystemTime>
Return the status-change time stored for this entry, if present.
Sourcepub fn uname(&self) -> &str
pub fn uname(&self) -> &str
Return the symbolic user name stored in the tar header, if present.
Sourcepub fn with_uname<S: Into<Box<str>>>(self, name: S) -> Self
pub fn with_uname<S: Into<Box<str>>>(self, name: S) -> Self
Replace the symbolic user name stored in the tar header.
Sourcepub fn gname(&self) -> &str
pub fn gname(&self) -> &str
Return the symbolic group name stored in the tar header, if present.
Sourcepub fn with_gname<S: Into<Box<str>>>(self, name: S) -> Self
pub fn with_gname<S: Into<Box<str>>>(self, name: S) -> Self
Replace the symbolic group name stored in the tar header.
Sourcepub fn with_mode(self, mode: u32) -> Self
pub fn with_mode(self, mode: u32) -> Self
Replace the raw permission bits stored in the tar header.
Sourcepub fn with_mtime(self, mtime: SystemTime) -> Self
pub fn with_mtime(self, mtime: SystemTime) -> Self
Replace the modification time stored for this entry.
Sourcepub fn with_atime(self, atime: SystemTime) -> Self
pub fn with_atime(self, atime: SystemTime) -> Self
Replace the access time stored for this entry.
Sourcepub fn with_ctime(self, ctime: SystemTime) -> Self
pub fn with_ctime(self, ctime: SystemTime) -> Self
Replace the status-change time stored for this entry.
Sourcepub fn attrs(&self) -> &AttrList
pub fn attrs(&self) -> &AttrList
Return the extended attributes that will be encoded in PAX records.
Sourcepub fn attrs_mut(&mut self) -> &mut AttrList
pub fn attrs_mut(&mut self) -> &mut AttrList
Return a mutable reference to the extended attributes.
Sourcepub fn with_attrs(self, attrs: AttrList) -> Self
pub fn with_attrs(self, attrs: AttrList) -> Self
Replace the extended-attribute list and return the updated entry.
Trait Implementations§
Source§impl<'a, R: AsyncRead + 'a> AsyncRead for TarRegularFile<'a, R>
Available on crate feature smol only.
impl<'a, R: AsyncRead + 'a> AsyncRead for TarRegularFile<'a, R>
smol only.Source§impl<'a, R: AsyncRead + 'a> From<TarRegularFile<'a, R>> for TarEntry<'a, R>
impl<'a, R: AsyncRead + 'a> From<TarRegularFile<'a, R>> for TarEntry<'a, R>
Source§fn from(file: TarRegularFile<'a, R>) -> Self
fn from(file: TarRegularFile<'a, R>) -> Self
impl<'__pin, 'a, R> Unpin for TarRegularFile<'a, R>where
PinnedFieldsOf<__Origin<'__pin, 'a, R>>: Unpin,
Auto Trait Implementations§
impl<'a, R> Freeze for TarRegularFile<'a, R>where
R: Freeze,
impl<'a, R> RefUnwindSafe for TarRegularFile<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for TarRegularFile<'a, R>where
R: Send,
impl<'a, R> Sync for TarRegularFile<'a, R>where
R: Sync,
impl<'a, R> UnsafeUnpin for TarRegularFile<'a, R>where
R: UnsafeUnpin,
impl<'a, R> UnwindSafe for TarRegularFile<'a, R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<R> AsyncReadExt for R
impl<R> AsyncReadExt for R
Source§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self>where
Self: Unpin,
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self>where
Self: Unpin,
Source§fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectoredFuture<'a, Self>where
Self: Unpin,
fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectoredFuture<'a, Self>where
Self: Unpin,
Source§fn read_to_end<'a>(
&'a mut self,
buf: &'a mut Vec<u8>,
) -> ReadToEndFuture<'a, Self>where
Self: Unpin,
fn read_to_end<'a>(
&'a mut self,
buf: &'a mut Vec<u8>,
) -> ReadToEndFuture<'a, Self>where
Self: Unpin,
Source§fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToStringFuture<'a, Self>where
Self: Unpin,
fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToStringFuture<'a, Self>where
Self: Unpin,
Source§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self>where
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self>where
Self: Unpin,
buf. Read moreSource§fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
fn take(self, limit: u64) -> Take<Self>where
Self: Sized,
limit bytes from it. Read moreSource§impl<R> AsyncReadExt for R
impl<R> AsyncReadExt for R
Source§fn chain<R>(self, next: R) -> Chain<Self, R>
fn chain<R>(self, next: R) -> Chain<Self, R>
Source§fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
Self: Unpin,
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>where
Self: Unpin,
buf in asynchronous
manner, returning a future type. Read moreSource§fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectored<'a, Self>where
Self: Unpin,
fn read_vectored<'a>(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>],
) -> ReadVectored<'a, Self>where
Self: Unpin,
AsyncRead into bufs using vectored
IO operations. Read moreSource§fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
Self: Unpin,
fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>where
Self: Unpin,
buf,
returning an error if end of file (EOF) is hit sooner. Read moreSource§fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>where
Self: Unpin,
fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>where
Self: Unpin,
AsyncRead. Read moreSource§fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToString<'a, Self>where
Self: Unpin,
fn read_to_string<'a>(
&'a mut self,
buf: &'a mut String,
) -> ReadToString<'a, Self>where
Self: Unpin,
AsyncRead. Read more