pub struct TarUrl {
pub archive_url: Arc<UrlRef>,
pub path: RelativePathBuf,
pub compression: Option<TarCompression>,
/* private fields */
}Available on crate feature
tar only.Expand description
A URL for an entry in a tarball (tar archive).
Supports bare as well as compressed tarballs.
The URL scheme is “tar:”, followed by full archive URL, a !, and then the entry path
within the archive. The fragment of the archive URL is used to explicitly set the
compression algorithm. If the compression is not explicitly set, will attempt to determine
it according to the format of the archive URL.
Fields§
§archive_url: Arc<UrlRef>The archive URL.
path: RelativePathBufThe entry path.
compression: Option<TarCompression>Compression.
Implementations§
Source§impl TarUrl
impl TarUrl
Sourcepub fn compression_from(
archive_url: &UrlRef,
) -> Result<Option<TarCompression>, UrlError>
pub fn compression_from( archive_url: &UrlRef, ) -> Result<Option<TarCompression>, UrlError>
Compression from archive URL fragment.
Sourcepub fn new(
context: &UrlContextRef,
archive_url: Arc<UrlRef>,
path: RelativePathBuf,
compression: Option<TarCompression>,
) -> Self
pub fn new( context: &UrlContextRef, archive_url: Arc<UrlRef>, path: RelativePathBuf, compression: Option<TarCompression>, ) -> Self
Constructor.
Sourcepub fn new_with(&self, path: RelativePathBuf) -> TarUrl
pub fn new_with(&self, path: RelativePathBuf) -> TarUrl
Constructor.
Trait Implementations§
Source§impl URL for TarUrl
impl URL for TarUrl
Source§fn context(&self) -> &UrlContext
fn context(&self) -> &UrlContext
The UrlContext used to create this URL.
Source§fn format(&self) -> Option<String>
fn format(&self) -> Option<String>
Format of the URL content’s canonical representation. Read more
Source§fn base(&self) -> Option<UrlRef>
fn base(&self) -> Option<UrlRef>
Returns a URL that is the equivalent of a “base directory” for the URL. Read more
Source§fn conform(&mut self) -> Result<(), UrlError>
fn conform(&mut self) -> Result<(), UrlError>
Available on crate feature
blocking only.Ensures that the URL conforms with the expectations of its functions. If
successful, this function may change the URL appropriately, e.g. a relative
path would be turned into an absolute path. Read more
Source§fn conform_async(&self) -> Result<ConformFuture, UrlError>
fn conform_async(&self) -> Result<ConformFuture, UrlError>
Available on crate feature
async only.Async version of URL::conform. Read more
Source§fn open_async(&self) -> Result<OpenFuture, UrlError>
fn open_async(&self) -> Result<OpenFuture, UrlError>
Available on crate feature
async only.Auto Trait Implementations§
impl Freeze for TarUrl
impl !RefUnwindSafe for TarUrl
impl Send for TarUrl
impl Sync for TarUrl
impl Unpin for TarUrl
impl !UnwindSafe for TarUrl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.