Struct pax_manifest::Token
source · pub struct Token {
pub token_value: String,
pub raw_value: String,
pub token_type: TokenType,
pub source_line: Option<String>,
pub token_location: Option<LocationInfo>,
}
Expand description
Container for parsed values with optional location information Location is optional in case this token was generated dynamically
Fields§
§token_value: String
§raw_value: String
§token_type: TokenType
§source_line: Option<String>
§token_location: Option<LocationInfo>
Implementations§
source§impl Token
impl Token
pub fn new( token_value: String, token_type: TokenType, token_location: LocationInfo, pax: &str ) -> Self
pub fn new_only_raw(raw_value: String, token_type: TokenType) -> Self
pub fn new_with_raw_value( token_value: String, raw_value: String, token_type: TokenType, token_location: LocationInfo, pax: &str ) -> Self
pub fn new_from_raw_value(raw_value: String, token_type: TokenType) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Token
impl<'de> Deserialize<'de> for Token
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 PartialEq for Token
impl PartialEq for Token
impl Eq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.