pub struct SecurityOrigin { /* private fields */ }Expand description
A security boundary for websites.
#WebKitSecurityOrigin is a representation of a security domain defined by websites. A security origin consists of a protocol, a hostname, and an optional port number.
Resources with the same security origin can generally access each
other for client-side scripting or database access. When comparing
origins, beware that if both protocol and host are None, the origins
should not be treated as equal.
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl SecurityOrigin
impl SecurityOrigin
Sourcepub fn as_ptr(&self) -> *mut WebKitSecurityOrigin
pub fn as_ptr(&self) -> *mut WebKitSecurityOrigin
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut WebKitSecurityOrigin) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut WebKitSecurityOrigin) -> &Self
Borrows the underlying C value.
Source§impl SecurityOrigin
impl SecurityOrigin
Sourcepub fn for_uri(uri: &str) -> SecurityOrigin
pub fn for_uri(uri: &str) -> SecurityOrigin
Sourcepub fn port(&self) -> u16
pub fn port(&self) -> u16
Gets the port of @self.
This function will always return 0 if the port is the default port for the given protocol. For example, http://example.com has the same security origin as http://example.com:80, and this function will return 0 for a #WebKitSecurityOrigin constructed from either URI.
§Returns
The port of the #WebKitSecurityOrigin.
Trait Implementations§
Source§impl Clone for SecurityOrigin
impl Clone for SecurityOrigin
Source§impl Debug for SecurityOrigin
impl Debug for SecurityOrigin
Source§impl Display for SecurityOrigin
impl Display for SecurityOrigin
Source§impl From<SecurityOrigin> for Value
impl From<SecurityOrigin> for Value
Source§fn from(s: SecurityOrigin) -> Self
fn from(s: SecurityOrigin) -> Self
Source§impl HasParamSpec for SecurityOrigin
impl HasParamSpec for SecurityOrigin
type ParamSpec = ParamSpecBoxed
Source§type SetValue = SecurityOrigin
type SetValue = SecurityOrigin
type BuilderFn = fn(&str) -> ParamSpecBoxedBuilder<'_, SecurityOrigin>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for SecurityOrigin
impl Hash for SecurityOrigin
Source§impl Ord for SecurityOrigin
impl Ord for SecurityOrigin
Source§fn cmp(&self, other: &SecurityOrigin) -> Ordering
fn cmp(&self, other: &SecurityOrigin) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SecurityOrigin
impl PartialEq for SecurityOrigin
Source§impl PartialOrd for SecurityOrigin
impl PartialOrd for SecurityOrigin
Source§impl StaticType for SecurityOrigin
impl StaticType for SecurityOrigin
Source§fn static_type() -> Type
fn static_type() -> Type
Self.