#[non_exhaustive]pub enum IncludeLoader {
Disabled,
System,
Custom(Arc<dyn IncludeSourceProvider + Send + Sync>),
}Expand description
Selects how the parser loads include sources.
crate::SafeMode sets processing restrictions independently of this choice.
Safe-mode path checks and allow-uri-read apply to every provider.
The default is Self::System. Secure mode never calls a provider.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Disabled
Do not load include targets. Preserve directives unless Secure mode requires a link fallback.
Applies to string, reader, and file input. Disabled includes are reported through source recovery diagnostics.
System
Load local targets from the operating-system filesystem.
With network, also load permitted HTTP(S) targets outside bare WebAssembly.
This is the default for all parse entry points.
Custom(Arc<dyn IncludeSourceProvider + Send + Sync>)
Load sources through a caller-supplied provider.
Implementations§
Source§impl IncludeLoader
impl IncludeLoader
Sourcepub fn custom(
provider: impl IncludeSourceProvider + Send + Sync + 'static,
) -> Self
pub fn custom( provider: impl IncludeSourceProvider + Send + Sync + 'static, ) -> Self
Load include sources through provider.
Trait Implementations§
Source§impl Clone for IncludeLoader
impl Clone for IncludeLoader
Source§impl Debug for IncludeLoader
impl Debug for IncludeLoader
Auto Trait Implementations§
impl !RefUnwindSafe for IncludeLoader
impl !UnwindSafe for IncludeLoader
impl Freeze for IncludeLoader
impl Send for IncludeLoader
impl Sync for IncludeLoader
impl Unpin for IncludeLoader
impl UnsafeUnpin for IncludeLoader
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