Struct web_archive::page_archive::PageArchive [−][src]
Intermediate struct storing the downloaded resources
Fields
url: Url
Base URL of the page being archived
content: String
The content/body of the page
resource_map: ResourceMap
A mapping of resource URLs to the downloaded resources
Implementations
impl PageArchive
[src]
pub fn embed_resources(&self) -> String
[src]
Searches img
, link
, and script
tags in the page body and
substitutes in the downloaded content.
- Images are base-64 encoded and inserted as
data:
URIs - Stylesheets are inserted as inline
<style>
tags, replacing the<link>
tags they originated from - Scripts are inserted into their originating
<script>
tags and the originalsrc
attribute is deleted.
pub fn write_to_disk<P: AsRef<Path>>(
&self,
_output_dir: &P
) -> Result<(), Error>
[src]
&self,
_output_dir: &P
) -> Result<(), Error>
NOT YET IMPLEMENTED
Write the downloaded resources to disk in the directory specified
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PageArchive
[src]
impl Send for PageArchive
[src]
impl Sync for PageArchive
[src]
impl Unpin for PageArchive
[src]
impl UnwindSafe for PageArchive
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,