Struct
Origin
pub struct Origin(/* private field */);Security origin of a frame as scheme://host[:port] or opaque.
Serialized like location.origin with a lowercase scheme and host and
default ports elided. Frames without a host (file:, data:, about:)
and unparseable URLs are opaque. An opaque origin matches no rule and no
grant.
Associated constants
Methods
#pub fn parse(text: &str) -> Result<Origin, OriginError>
Parses a configured origin such as app://app or
http://localhost:5173.
Errors
Returns OriginError when text is not a URL, has no host, is a
file: URL, or carries a path, query, fragment or credentials.
#pub fn is_opaque(&self) -> bool
Returns true for the opaque origin.