pub struct BasicComposer {
parser: BasicParser,
position: Position,
anchors: HashMap<String, Value>,
limits: Limits,
resource_tracker: ResourceTracker,
alias_expansion_stack: Vec<String>,
current_depth: usize,
tag_resolver: TagResolver,
}Expand description
A basic composer implementation for converting events to nodes
Fields§
§parser: BasicParser§position: Position§anchors: HashMap<String, Value>§limits: Limits§resource_tracker: ResourceTracker§alias_expansion_stack: Vec<String>§current_depth: usize§tag_resolver: TagResolverImplementations§
Source§impl BasicComposer
impl BasicComposer
Sourcepub fn with_limits(input: String, limits: Limits) -> Self
pub fn with_limits(input: String, limits: Limits) -> Self
Create a new composer with custom limits
Sourcepub fn new_eager(input: String) -> Self
pub fn new_eager(input: String) -> Self
Create a new composer with eager parsing (for compatibility)
Sourcepub fn new_eager_with_limits(input: String, limits: Limits) -> Self
pub fn new_eager_with_limits(input: String, limits: Limits) -> Self
Create a new composer with eager parsing and custom limits
Sourcefn compose_node(&mut self) -> Result<Option<Value>>
fn compose_node(&mut self) -> Result<Option<Value>>
Compose a node from events (recursive)
Sourcefn compose_scalar(&self, value: String, style: ScalarStyle) -> Result<Value>
fn compose_scalar(&self, value: String, style: ScalarStyle) -> Result<Value>
Compose a scalar value
Sourcefn compose_tagged_scalar(
&mut self,
value: String,
tag_str: String,
) -> Result<Value>
fn compose_tagged_scalar( &mut self, value: String, tag_str: String, ) -> Result<Value>
Compose a tagged scalar value
Sourcefn compose_sequence(&mut self) -> Result<Option<Value>>
fn compose_sequence(&mut self) -> Result<Option<Value>>
Compose a sequence
Sourcefn compose_mapping(&mut self) -> Result<Option<Value>>
fn compose_mapping(&mut self) -> Result<Option<Value>>
Compose a mapping
Trait Implementations§
Source§impl Composer for BasicComposer
impl Composer for BasicComposer
Source§fn check_document(&self) -> bool
fn check_document(&self) -> bool
Check if there are more documents available
Source§impl Debug for BasicComposer
impl Debug for BasicComposer
Auto Trait Implementations§
impl Freeze for BasicComposer
impl !RefUnwindSafe for BasicComposer
impl Send for BasicComposer
impl Sync for BasicComposer
impl Unpin for BasicComposer
impl !UnwindSafe for BasicComposer
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