pub struct ParsingContext {
pub current_field: Option<String>,
pub current_component: Option<String>,
pub message_type: String,
pub original_message: String,
}
Expand description
Parsing context that flows through the parsing pipeline
Fields§
§current_field: Option<String>
Current field being parsed
current_component: Option<String>
Current component being parsed
message_type: String
Message type
original_message: String
Original message for context
Implementations§
Source§impl ParsingContext
impl ParsingContext
Sourcepub fn new(message_type: String, original_message: String) -> Self
pub fn new(message_type: String, original_message: String) -> Self
Create a new parsing context
Sourcepub fn with_field(&self, field: String) -> Self
pub fn with_field(&self, field: String) -> Self
Create a context with field information
Sourcepub fn with_component(&self, component: String) -> Self
pub fn with_component(&self, component: String) -> Self
Create a context with component information
Trait Implementations§
Source§impl Clone for ParsingContext
impl Clone for ParsingContext
Source§fn clone(&self) -> ParsingContext
fn clone(&self) -> ParsingContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ParsingContext
impl RefUnwindSafe for ParsingContext
impl Send for ParsingContext
impl Sync for ParsingContext
impl Unpin for ParsingContext
impl UnwindSafe for ParsingContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more