pub struct ParserConfig {
pub parser_type: ParserType,
pub custom_prompt: Option<String>,
pub validate: bool,
}Expand description
Parser configuration — what to do with each frame’s content.
Fields§
§parser_type: ParserTypeWhich parser to use.
custom_prompt: Option<String>Optional custom prompt pattern for shell prompt parser. Accepts a regex pattern as a string.
validate: boolWhether to enforce a protocol checksum when present. Default: false.
When true, a protocol parser that defines a checksum (currently NMEA’s
*XX XOR, Modbus ASCII LRC) drops mismatched frames instead of emitting
them. The dropped frame is counted in PushOutcome.frames_dropped and
does NOT halt the read (stream-fatal errors like SLIP
malformed escapes still stop the decode). When false, the frame is
emitted with checksum_valid: Some(false) (no-op for the caller).
A sentence/message WITHOUT a checksum is accepted regardless.
Trait Implementations§
Source§impl Clone for ParserConfig
impl Clone for ParserConfig
Source§impl Debug for ParserConfig
impl Debug for ParserConfig
Source§impl<'de> Deserialize<'de> for ParserConfig
impl<'de> Deserialize<'de> for ParserConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ParserConfig
impl JsonSchema for ParserConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ParserConfig
impl PartialEq for ParserConfig
Source§impl Serialize for ParserConfig
impl Serialize for ParserConfig
impl StructuralPartialEq for ParserConfig
Auto Trait Implementations§
impl Freeze for ParserConfig
impl RefUnwindSafe for ParserConfig
impl Send for ParserConfig
impl Sync for ParserConfig
impl Unpin for ParserConfig
impl UnsafeUnpin for ParserConfig
impl UnwindSafe for ParserConfig
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