pub struct HtmlInject<'a> {
pub fragment: &'a str,
pub anchor: HtmlAnchor,
pub marker: Option<&'a str>,
pub skip_if_contains: &'a [&'a str],
}Expand description
Options for inject.
Fields§
§fragment: &'a str§anchor: HtmlAnchor§marker: Option<&'a str>If this substring is already present, return None (idempotent).
skip_if_contains: &'a [&'a str]Extra skip needles (e.g. id="sova-devtools").
Implementations§
Source§impl<'a> HtmlInject<'a>
impl<'a> HtmlInject<'a>
pub fn new(anchor: HtmlAnchor, fragment: &'a str) -> Self
pub fn marker(self, marker: &'a str) -> Self
pub fn skip_if_contains(self, needles: &'a [&'a str]) -> Self
Trait Implementations§
Source§impl<'a> Clone for HtmlInject<'a>
impl<'a> Clone for HtmlInject<'a>
Source§fn clone(&self) -> HtmlInject<'a>
fn clone(&self) -> HtmlInject<'a>
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 moreAuto Trait Implementations§
impl<'a> Freeze for HtmlInject<'a>
impl<'a> RefUnwindSafe for HtmlInject<'a>
impl<'a> Send for HtmlInject<'a>
impl<'a> Sync for HtmlInject<'a>
impl<'a> Unpin for HtmlInject<'a>
impl<'a> UnsafeUnpin for HtmlInject<'a>
impl<'a> UnwindSafe for HtmlInject<'a>
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