pub struct SetDownloadBehavior {
pub behavior: SetDownloadBehaviorBehaviorOption,
pub browser_context_id: Option<BrowserContextId>,
pub download_path: Option<String>,
pub events_enabled: Option<bool>,
}Expand description
Set the behavior when downloading a file.
Fields§
§behavior: SetDownloadBehaviorBehaviorOptionWhether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids.
browser_context_id: Option<BrowserContextId>BrowserContext to set download behavior. When omitted, default browser context is used.
download_path: Option<String>The default path to save downloaded files to. This is required if behavior is set to ‘allow’ or ‘allowAndName’.
events_enabled: Option<bool>Whether to emit download events (defaults to false).
Trait Implementations§
Source§impl Clone for SetDownloadBehavior
impl Clone for SetDownloadBehavior
Source§fn clone(&self) -> SetDownloadBehavior
fn clone(&self) -> SetDownloadBehavior
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 SetDownloadBehavior
impl Debug for SetDownloadBehavior
Source§impl<'de> Deserialize<'de> for SetDownloadBehavior
impl<'de> Deserialize<'de> for SetDownloadBehavior
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
Source§impl Method for SetDownloadBehavior
impl Method for SetDownloadBehavior
const NAME: &'static str = "Browser.setDownloadBehavior"
type ReturnObject = SetDownloadBehaviorReturnObject
fn to_method_call(self, call_id: CallId) -> MethodCall<Self>where
Self: Sized,
Source§impl PartialEq for SetDownloadBehavior
impl PartialEq for SetDownloadBehavior
Source§impl Serialize for SetDownloadBehavior
impl Serialize for SetDownloadBehavior
impl StructuralPartialEq for SetDownloadBehavior
Auto Trait Implementations§
impl Freeze for SetDownloadBehavior
impl RefUnwindSafe for SetDownloadBehavior
impl Send for SetDownloadBehavior
impl Sync for SetDownloadBehavior
impl Unpin for SetDownloadBehavior
impl UnsafeUnpin for SetDownloadBehavior
impl UnwindSafe for SetDownloadBehavior
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