pub enum LinkPolicy {
Confirm,
Allow,
}Expand description
Whether link.open may hand an external (http/https/mailto) address to the host without
asking. Set by the host in code, never by a command, so a programmatic caller can’t widen it.
Variants§
Confirm
link.open refuses external addresses; the user opens them by clicking the link, which
asks first (Session::open_confirmed_link). References still navigate.
Allow
The host trusts every caller of this session (an embedding that vets requests itself):
link.open opens allowed addresses directly. Disallowed schemes stay refused.
Trait Implementations§
Source§impl Clone for LinkPolicy
impl Clone for LinkPolicy
Source§fn clone(&self) -> LinkPolicy
fn clone(&self) -> LinkPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LinkPolicy
Source§impl Debug for LinkPolicy
impl Debug for LinkPolicy
Source§impl Default for LinkPolicy
impl Default for LinkPolicy
Source§fn default() -> LinkPolicy
fn default() -> LinkPolicy
Returns the “default value” for a type. Read more
impl Eq for LinkPolicy
Source§impl PartialEq for LinkPolicy
impl PartialEq for LinkPolicy
impl StructuralPartialEq for LinkPolicy
Auto Trait Implementations§
impl Freeze for LinkPolicy
impl RefUnwindSafe for LinkPolicy
impl Send for LinkPolicy
impl Sync for LinkPolicy
impl Unpin for LinkPolicy
impl UnsafeUnpin for LinkPolicy
impl UnwindSafe for LinkPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.