Struct sciter::host::Archive

source ·
pub struct Archive(_);
Expand description

Sciter compressed archive.

An archive is produced by packfolder (from SDK) that creates a blob with compressed resources. It allows to use the same resource pack uniformly across different platforms.

For example, app resource files (HTML/CSS/scripts) can be stored in an assets folder that can be packed into a single archive by calling packfolder.exe assets target/assets.rc -binary. And later can be accessed via the Archive API:

let archived = include_bytes!("target/assets.rc");
let assets = sciter::host::Archive::open(archived).expect("Unable to load archive.");

// access `assets/index.htm`
let html_data = assets.get("index.htm").unwrap();

Implementations

Open archive blob.

Get an archive item.

Given a path, returns a reference to the contents of an archived item.

Trait Implementations

Close the archive.

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.