pub struct DocumentHandlerConfig {
pub id: Option<String>,
pub label: Option<String>,
pub extensions: Vec<String>,
pub mime_types: Vec<String>,
pub route: String,
pub resource_param: Option<String>,
pub open_mode: Option<String>,
pub reuse_key: Option<String>,
pub allow_multiple: Option<bool>,
}Expand description
File or resource entry point that can be routed into a plugin panel.
Fields§
§id: Option<String>Stable handler id, unique within the plugin. Defaults to the route when omitted.
label: Option<String>User-facing handler label, used in menus and open-with UI.
extensions: Vec<String>Lowercase extensions including the leading dot, for example [“.md”].
mime_types: Vec<String>MIME types handled by this plugin.
route: StringPlugin route opened for this resource.
resource_param: Option<String>Query parameter that receives the resource path/URI. Defaults to “path”.
open_mode: Option<String>Handler-specific open behavior; falls back to the plugin window policy.
reuse_key: Option<String>Handler-specific reuse key; falls back to the plugin window policy.
allow_multiple: Option<bool>Handler-specific multiple-window allowance; falls back to the plugin policy.
Trait Implementations§
Source§impl Clone for DocumentHandlerConfig
impl Clone for DocumentHandlerConfig
Source§fn clone(&self) -> DocumentHandlerConfig
fn clone(&self) -> DocumentHandlerConfig
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 DocumentHandlerConfig
impl Debug for DocumentHandlerConfig
Source§impl Default for DocumentHandlerConfig
impl Default for DocumentHandlerConfig
Source§fn default() -> DocumentHandlerConfig
fn default() -> DocumentHandlerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DocumentHandlerConfig
impl<'de> Deserialize<'de> for DocumentHandlerConfig
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 DocumentHandlerConfig
impl RefUnwindSafe for DocumentHandlerConfig
impl Send for DocumentHandlerConfig
impl Sync for DocumentHandlerConfig
impl Unpin for DocumentHandlerConfig
impl UnsafeUnpin for DocumentHandlerConfig
impl UnwindSafe for DocumentHandlerConfig
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