Struct diagnostic_quick::error_3rd::NodeLocation
source · Expand description
Represents an AST object with position
Fields§
§value: TThe actual value
range: Range<usize>The Start offset and end offset
file: FileIDAbsolute path to the file where the node resides
Implementations§
source§impl<T> NodeLocation<T>
impl<T> NodeLocation<T>
pub fn new(value: T, range: &Range<usize>, file: &FileID) -> Self
pub fn with_range(self, range: &Range<usize>) -> Self
pub fn with_file(self, file: &FileID) -> Self
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> NodeLocation<U>
pub fn eq_strict(&self, other: &Self) -> boolwhere
T: PartialEq,
Trait Implementations§
source§impl<T: Clone> Clone for NodeLocation<T>
impl<T: Clone> Clone for NodeLocation<T>
source§fn clone(&self) -> NodeLocation<T>
fn clone(&self) -> NodeLocation<T>
Returns a copy 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 moresource§impl<T: Debug> Debug for NodeLocation<T>
impl<T: Debug> Debug for NodeLocation<T>
source§impl<T> Deref for NodeLocation<T>
impl<T> Deref for NodeLocation<T>
source§impl<T> DerefMut for NodeLocation<T>
impl<T> DerefMut for NodeLocation<T>
source§impl<'de, T> Deserialize<'de> for NodeLocation<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for NodeLocation<T>where
T: Deserialize<'de>,
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<T> From<T> for NodeLocation<T>
impl<T> From<T> for NodeLocation<T>
source§impl<T> Hash for NodeLocation<T>where
T: Hash,
impl<T> Hash for NodeLocation<T>where
T: Hash,
source§impl<T> PartialEq<NodeLocation<T>> for NodeLocation<T>where
T: Eq,
impl<T> PartialEq<NodeLocation<T>> for NodeLocation<T>where
T: Eq,
source§impl<T> Serialize for NodeLocation<T>where
T: Serialize,
impl<T> Serialize for NodeLocation<T>where
T: Serialize,
impl<T> Eq for NodeLocation<T>where
T: Eq,
Auto Trait Implementations§
impl<T> RefUnwindSafe for NodeLocation<T>where
T: RefUnwindSafe,
impl<T> !Send for NodeLocation<T>
impl<T> !Sync for NodeLocation<T>
impl<T> Unpin for NodeLocation<T>where
T: Unpin,
impl<T> UnwindSafe for NodeLocation<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SetParameter for T
impl<T> SetParameter for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
§impl<Src, Dst> ValueInto<Dst> for Srcwhere
Dst: ValueFrom<Src>,
impl<Src, Dst> ValueInto<Dst> for Srcwhere
Dst: ValueFrom<Src>,
§fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.