pub struct SourceLocation {
pub line: u32,
pub column: u32,
pub byte_offset: usize,
}Expand description
A source location in the checked HTML input.
Positions are one-based; byte_offset is zero-based. A finding has no
location when it cannot be mapped back to a concrete source range.
Fields§
§line: u32One-based line number.
column: u32One-based column number.
byte_offset: usizeZero-based byte offset.
Trait Implementations§
Source§impl Clone for SourceLocation
impl Clone for SourceLocation
Source§fn clone(&self) -> SourceLocation
fn clone(&self) -> SourceLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SourceLocation
Source§impl Debug for SourceLocation
impl Debug for SourceLocation
Source§impl<'de> Deserialize<'de> for SourceLocation
impl<'de> Deserialize<'de> for SourceLocation
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 Display for SourceLocation
impl Display for SourceLocation
Source§fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
"line:column" — the same shape src/infoset.rs’s old, pre-Phase-08
relax_ng::Element::location() string used to format by hand,
kept for message-text compatibility now that this struct itself is
that Element impl’s Location type
(relax_ng::ValidationError<L>’s Display impl needs L: Display
to include the location in a finding’s message text).
impl Eq for SourceLocation
Source§impl PartialEq for SourceLocation
impl PartialEq for SourceLocation
Source§impl Serialize for SourceLocation
impl Serialize for SourceLocation
impl StructuralPartialEq for SourceLocation
Auto Trait Implementations§
impl Freeze for SourceLocation
impl RefUnwindSafe for SourceLocation
impl Send for SourceLocation
impl Sync for SourceLocation
impl Unpin for SourceLocation
impl UnsafeUnpin for SourceLocation
impl UnwindSafe for SourceLocation
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