pub struct WindowPolicyConfig {
pub default_open_mode: Option<String>,
pub reuse_key: Option<String>,
pub allow_multiple: Option<bool>,
pub document_handlers: Vec<DocumentHandlerConfig>,
}Expand description
Declarative window behavior requested by a plugin.
The host owns actual window creation and decides whether a request is allowed, but these fields let a plugin describe how its routes and resources should be opened when invoked from menus, deeplinks, file associations, or other plugins.
Fields§
§default_open_mode: Option<String>Default open behavior for plugin routes: “smart”, “current”, “new_window”, “reuse_existing”, or “reuse_or_new”.
reuse_key: Option<String>Default reuse key: “plugin”, “route”, “resource”, or “none”.
allow_multiple: Option<bool>Whether this plugin may have more than one window at the same time. Omitted means the host default is used.
document_handlers: Vec<DocumentHandlerConfig>File/resource handlers declared by this plugin.
Trait Implementations§
Source§impl Clone for WindowPolicyConfig
impl Clone for WindowPolicyConfig
Source§fn clone(&self) -> WindowPolicyConfig
fn clone(&self) -> WindowPolicyConfig
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 moreSource§impl Debug for WindowPolicyConfig
impl Debug for WindowPolicyConfig
Source§impl Default for WindowPolicyConfig
impl Default for WindowPolicyConfig
Source§fn default() -> WindowPolicyConfig
fn default() -> WindowPolicyConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WindowPolicyConfig
impl<'de> Deserialize<'de> for WindowPolicyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WindowPolicyConfig
impl RefUnwindSafe for WindowPolicyConfig
impl Send for WindowPolicyConfig
impl Sync for WindowPolicyConfig
impl Unpin for WindowPolicyConfig
impl UnsafeUnpin for WindowPolicyConfig
impl UnwindSafe for WindowPolicyConfig
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