pub struct LoaderBuilder { /* private fields */ }Expand description
Builder for configuring and creating a Loader.
use rlsp_yaml_parser::loader::LoaderBuilder;
let docs = LoaderBuilder::new().lossless().build().load("hello\n").unwrap();
assert_eq!(docs.len(), 1);Implementations§
Source§impl LoaderBuilder
impl LoaderBuilder
Sourcepub const fn lossless(self) -> Self
pub const fn lossless(self) -> Self
Use lossless mode — aliases become Node::Alias nodes.
Sourcepub const fn max_nesting_depth(self, limit: usize) -> Self
pub const fn max_nesting_depth(self, limit: usize) -> Self
Override the maximum nesting depth.
Sourcepub const fn max_anchors(self, limit: usize) -> Self
pub const fn max_anchors(self, limit: usize) -> Self
Override the maximum anchor count.
Sourcepub const fn max_expanded_nodes(self, limit: usize) -> Self
pub const fn max_expanded_nodes(self, limit: usize) -> Self
Override the maximum expanded-node count (resolved mode only).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoaderBuilder
impl RefUnwindSafe for LoaderBuilder
impl Send for LoaderBuilder
impl Sync for LoaderBuilder
impl Unpin for LoaderBuilder
impl UnsafeUnpin for LoaderBuilder
impl UnwindSafe for LoaderBuilder
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