pub struct DocumentConfig {Show 13 fields
pub viewport: Option<Viewport>,
pub base_url: Option<String>,
pub ua_stylesheets: Option<Vec<String>>,
pub net_provider: Option<Arc<dyn NetProvider>>,
pub navigation_provider: Option<Arc<dyn NavigationProvider>>,
pub shell_provider: Option<Arc<dyn ShellProvider>>,
pub html_parser_provider: Option<Arc<dyn HtmlParserProvider>>,
pub font_ctx: Option<FontContext>,
pub media_type: Option<MediaType>,
pub style_threading: StyleThreading,
pub incremental: Option<bool>,
pub abort_signal: Option<AbortSignal>,
pub subdocument_depth: usize,
}Expand description
Options used when constructing a BaseDocument
Fields§
§viewport: Option<Viewport>The initial Viewport
base_url: Option<String>The base url which relative URLs are resolved against
ua_stylesheets: Option<Vec<String>>User Agent stylesheets
net_provider: Option<Arc<dyn NetProvider>>Net provider to handle network requests for resources
Navigation provider to handle link clicks and form submissions
shell_provider: Option<Arc<dyn ShellProvider>>Shell provider to redraw requests, clipboard, etc
html_parser_provider: Option<Arc<dyn HtmlParserProvider>>HTML parser provider. Used to parse HTML for setInnerHTML
font_ctx: Option<FontContext>Parley FontContext
media_type: Option<MediaType>The CSS media type used to evaluate @media rules.
Defaults to MediaType::screen.
style_threading: StyleThreadingStrategy for Stylo’s style traversal.
Defaults to StyleThreading::Parallel.
incremental: Option<bool>Whether incremental layout is enabled. Defaults to true.
abort_signal: Option<AbortSignal>If set, every sub-resource Request blitz-dom creates for this
document will carry this signal. Aborting it cancels every in-flight
fetch tied to this document.
subdocument_depth: usizeHow deeply this document is nested within other documents
(0 for a root document). Used to limit <iframe> nesting depth.
Trait Implementations§
Source§impl Default for DocumentConfig
impl Default for DocumentConfig
Source§fn default() -> DocumentConfig
fn default() -> DocumentConfig
Auto Trait Implementations§
impl !RefUnwindSafe for DocumentConfig
impl !Send for DocumentConfig
impl !Sync for DocumentConfig
impl !UnwindSafe for DocumentConfig
impl Freeze for DocumentConfig
impl Unpin for DocumentConfig
impl UnsafeUnpin for DocumentConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more