pub struct OriginPolicy { /* private fields */ }Implementations§
Source§impl OriginPolicy
impl OriginPolicy
Source§impl OriginPolicy
impl OriginPolicy
pub fn new( overrides: impl IntoIterator<Item = (impl AsRef<str>, Url)>, ) -> Result<Self>
pub fn with_override( self, origin: impl AsRef<str>, raw_url: String, ) -> Result<Self>
pub fn override_origin( &mut self, origin: impl AsRef<str>, raw_url: String, ) -> Result<()>
Sourcepub fn merged_with(&self, overrides: &Self) -> Self
pub fn merged_with(&self, overrides: &Self) -> Self
Layers overrides on top of the current policy.
pub fn base_url(&self, origin: impl AsRef<str>) -> Result<Url>
pub fn resolve(&self, origin: impl AsRef<str>, path: &str) -> Result<String>
pub fn resolve_segments( &self, origin: impl AsRef<str>, segments: &[&str], ) -> Result<String>
pub fn override_for(&self, canonical: &str) -> Option<&Url>
Trait Implementations§
Source§impl Clone for OriginPolicy
impl Clone for OriginPolicy
Source§impl Debug for OriginPolicy
impl Debug for OriginPolicy
Auto Trait Implementations§
impl Forget for OriginPolicy
impl Freeze for OriginPolicy
impl Move for OriginPolicy
impl RefUnwindSafe for OriginPolicy
impl Send for OriginPolicywhere
RawVecInner: Send,
impl Sync for OriginPolicywhere
RawVecInner: Sync,
impl Unpin for OriginPolicy
impl UnsafeUnpin for OriginPolicy
impl UnwindSafe for OriginPolicywhere
RawVecInner: UnwindSafe,
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
Mutably borrows from an owned value. Read more