Skip to main content

PreventDefault

Trait PreventDefault 

Source
pub trait PreventDefault<R: Runtime> {
    // Required methods
    fn prevent_default_script(&self) -> Script;
    fn try_prevent_default_script(&self) -> Option<Script>;
}
Expand description

Provide access to the script.

Required Methods§

Source

fn prevent_default_script(&self) -> Script

Retrieve the script.

§Panics

Panics if the plugin was not built with manual injection.

Source

fn try_prevent_default_script(&self) -> Option<Script>

Attempt to retrieve the script.

Returns Some if the plugin was built with manual injection. Otherwise returns None.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R, T> PreventDefault<R> for T
where R: Runtime, T: Manager<R>,