pub struct Located<T> {
pub value: T,
pub line: usize,
pub column: usize,
}Expand description
A value and where it was written: for a map entry, the line of its key (where a diagnostic about it points); for a list item, the item’s own line.
Fields§
§value: T§line: usize§column: usizeImplementations§
Trait Implementations§
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for Located<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for Located<T>
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: JsonSchema> JsonSchema for Located<T>
impl<T: JsonSchema> JsonSchema for Located<T>
Source§fn json_schema(g: &mut SchemaGenerator) -> Schema
fn json_schema(g: &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 moreimpl<T: PartialEq> StructuralPartialEq for Located<T>
Auto Trait Implementations§
impl<T> Freeze for Located<T>where
T: Freeze,
impl<T> RefUnwindSafe for Located<T>where
T: RefUnwindSafe,
impl<T> Send for Located<T>where
T: Send,
impl<T> Sync for Located<T>where
T: Sync,
impl<T> Unpin for Located<T>where
T: Unpin,
impl<T> UnsafeUnpin for Located<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Located<T>where
T: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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