pub struct WebViewContentOptionsDTO {
pub EnableCommandURIs: Option<bool>,
pub EnableScripts: Option<bool>,
pub EnableForms: Option<bool>,
pub PortMapping: Option<Value>,
pub LocalResourceRoots: Option<Value>,
}Expand description
A serializable struct that represents the options controlling the content within a WebView, including script enablement and local resource access.
This DTO is sent from Cocoon to Mountain when a WebView is created to
configure its security sandbox and capabilities.
Fields§
§EnableCommandURIs: Option<bool>Enables the use of vscode:command: URIs within the WebView.
EnableScripts: Option<bool>Enables the execution of scripts within the WebView.
EnableForms: Option<bool>Enables the use of HTML forms within the WebView.
PortMapping: Option<Value>An optional array of port mappings for forwarding traffic from the
WebView to the extension host. Serialized
Vec<{ webviewPort: number, extensionHostPort: number }>.
LocalResourceRoots: Option<Value>An optional array of URIs that define the root paths from which the
WebView is allowed to load local resources. Serialized
Vec<UriComponents>.
Trait Implementations§
Source§impl Clone for WebViewContentOptionsDTO
impl Clone for WebViewContentOptionsDTO
Source§fn clone(&self) -> WebViewContentOptionsDTO
fn clone(&self) -> WebViewContentOptionsDTO
Returns a duplicate of the value. Read more
1.0.0 · 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 WebViewContentOptionsDTO
impl Debug for WebViewContentOptionsDTO
Source§impl<'de> Deserialize<'de> for WebViewContentOptionsDTO
impl<'de> Deserialize<'de> for WebViewContentOptionsDTO
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 WebViewContentOptionsDTO
impl RefUnwindSafe for WebViewContentOptionsDTO
impl Send for WebViewContentOptionsDTO
impl Sync for WebViewContentOptionsDTO
impl Unpin for WebViewContentOptionsDTO
impl UnwindSafe for WebViewContentOptionsDTO
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