#[non_exhaustive]pub struct MarkdownParserState {
pub config: Rc<MarkdownParserConfig>,
/* private fields */
}Expand description
Parser state containing configuration and shared context
This structure holds the parser configuration and provides shared state during the parsing process. It’s designed to be cloned cheaply using reference counting for the configuration.
§Examples
use markdown_ppp::parser::{MarkdownParserState, config::MarkdownParserConfig};
// Create with default configuration
let state = MarkdownParserState::new();
// Create with custom configuration
let config = MarkdownParserConfig::default();
let state = MarkdownParserState::with_config(config);Note: This struct is marked #[non_exhaustive] to allow adding new fields
in future versions without breaking existing code.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.config: Rc<MarkdownParserConfig>The parser configuration (reference-counted for efficient cloning)
Implementations§
Source§impl MarkdownParserState
impl MarkdownParserState
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new parser state with default configuration
§Examples
use markdown_ppp::parser::MarkdownParserState;
let state = MarkdownParserState::new();Sourcepub fn with_config(config: MarkdownParserConfig) -> Self
pub fn with_config(config: MarkdownParserConfig) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MarkdownParserState
impl !RefUnwindSafe for MarkdownParserState
impl !Send for MarkdownParserState
impl !Sync for MarkdownParserState
impl Unpin for MarkdownParserState
impl !UnwindSafe for MarkdownParserState
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