Skip to main content

LoadingQuery

Trait LoadingQuery 

Source
pub trait LoadingQuery {
    // Required methods
    fn state(&self) -> LoadingState;
    fn progress(&self) -> Option<LoadProgress>;
    fn final_url(&self) -> Option<&str>;
    fn redirect_chain(&self) -> &[String];
    fn mime(&self) -> Option<&str>;
    fn tls_summary(&self) -> Option<&TlsSummary>;
    fn cache_origin(&self) -> CacheOrigin;
    fn error(&self) -> Option<&LoadError>;
}
Expand description

Common-minimum loading-state queries. Implemented by Hekate’s per-session snapshot — exposed to the host for chrome (URL bar, security indicator, loading spinner) and to Apparatus for debugging.

Required Methods§

Source

fn state(&self) -> LoadingState

Source

fn progress(&self) -> Option<LoadProgress>

Source

fn final_url(&self) -> Option<&str>

Final URL after redirects, if a load has completed enough to identify a final source.

Source

fn redirect_chain(&self) -> &[String]

Redirect chain (in order). Empty if no redirects occurred.

Source

fn mime(&self) -> Option<&str>

MIME / Content-Type of the response body.

Source

fn tls_summary(&self) -> Option<&TlsSummary>

TLS handshake summary, if the load used HTTPS / TLS-wrapped protocol.

Source

fn cache_origin(&self) -> CacheOrigin

Whether the response came from cache, missed, or isn’t cacheable.

Source

fn error(&self) -> Option<&LoadError>

Protocol/network/certificate error, if the load failed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§