pub(crate) trait URLMethods<D>where
D: DomTypes,{
Show 28 methods
// Required methods
fn Parse(
global: &<D as DomTypes>::GlobalScope,
url: USVString,
base: Option<USVString>,
_can_gc: CanGc,
) -> Option<Root<Dom<<D as DomTypes>::URL>>>;
fn CanParse(
global: &<D as DomTypes>::GlobalScope,
url: USVString,
base: Option<USVString>,
) -> bool;
fn Href(&self) -> USVString;
fn SetHref(&self, value: USVString) -> Result<(), Error>;
fn Origin(&self) -> USVString;
fn Protocol(&self) -> USVString;
fn SetProtocol(&self, value: USVString);
fn Username(&self) -> USVString;
fn SetUsername(&self, value: USVString);
fn Password(&self) -> USVString;
fn SetPassword(&self, value: USVString);
fn Host(&self) -> USVString;
fn SetHost(&self, value: USVString);
fn Hostname(&self) -> USVString;
fn SetHostname(&self, value: USVString);
fn Port(&self) -> USVString;
fn SetPort(&self, value: USVString);
fn Pathname(&self) -> USVString;
fn SetPathname(&self, value: USVString);
fn Search(&self) -> USVString;
fn SetSearch(&self, value: USVString);
fn SearchParams(
&self,
_can_gc: CanGc,
) -> Root<Dom<<D as DomTypes>::URLSearchParams>>;
fn Hash(&self) -> USVString;
fn SetHash(&self, value: USVString);
fn CreateObjectURL(
global: &<D as DomTypes>::GlobalScope,
blob: &<D as DomTypes>::Blob,
) -> DOMString;
fn RevokeObjectURL(global: &<D as DomTypes>::GlobalScope, url: DOMString);
fn ToJSON(&self) -> USVString;
fn Constructor(
global: &<D as DomTypes>::GlobalScope,
proto: Option<Handle<'_, *mut JSObject>>,
can_gc: CanGc,
url: USVString,
base: Option<USVString>,
) -> Result<Root<Dom<<D as DomTypes>::URL>>, Error>;
}
Required Methods§
fn Parse( global: &<D as DomTypes>::GlobalScope, url: USVString, base: Option<USVString>, _can_gc: CanGc, ) -> Option<Root<Dom<<D as DomTypes>::URL>>>
fn CanParse( global: &<D as DomTypes>::GlobalScope, url: USVString, base: Option<USVString>, ) -> bool
fn Href(&self) -> USVString
fn SetHref(&self, value: USVString) -> Result<(), Error>
fn Origin(&self) -> USVString
fn Protocol(&self) -> USVString
fn SetProtocol(&self, value: USVString)
fn Username(&self) -> USVString
fn SetUsername(&self, value: USVString)
fn Password(&self) -> USVString
fn SetPassword(&self, value: USVString)
fn Host(&self) -> USVString
fn SetHost(&self, value: USVString)
fn Hostname(&self) -> USVString
fn SetHostname(&self, value: USVString)
fn Port(&self) -> USVString
fn SetPort(&self, value: USVString)
fn Pathname(&self) -> USVString
fn SetPathname(&self, value: USVString)
fn Search(&self) -> USVString
fn SetSearch(&self, value: USVString)
fn SearchParams( &self, _can_gc: CanGc, ) -> Root<Dom<<D as DomTypes>::URLSearchParams>>
fn Hash(&self) -> USVString
fn SetHash(&self, value: USVString)
fn CreateObjectURL( global: &<D as DomTypes>::GlobalScope, blob: &<D as DomTypes>::Blob, ) -> DOMString
fn RevokeObjectURL(global: &<D as DomTypes>::GlobalScope, url: DOMString)
fn ToJSON(&self) -> USVString
fn Constructor( global: &<D as DomTypes>::GlobalScope, proto: Option<Handle<'_, *mut JSObject>>, can_gc: CanGc, url: USVString, base: Option<USVString>, ) -> Result<Root<Dom<<D as DomTypes>::URL>>, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.