Struct webkit6::SecurityOrigin
source · 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
§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§fn eq(&self, other: &SecurityOrigin) -> bool
fn eq(&self, other: &SecurityOrigin) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SecurityOrigin
impl PartialOrd for SecurityOrigin
source§fn partial_cmp(&self, other: &SecurityOrigin) -> Option<Ordering>
fn partial_cmp(&self, other: &SecurityOrigin) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for SecurityOrigin
impl StaticType for SecurityOrigin
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for SecurityOrigin
impl StructuralPartialEq for SecurityOrigin
Auto Trait Implementations§
impl Freeze for SecurityOrigin
impl RefUnwindSafe for SecurityOrigin
impl !Send for SecurityOrigin
impl !Sync for SecurityOrigin
impl Unpin for SecurityOrigin
impl UnwindSafe for SecurityOrigin
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)