pub struct TyvarOrigin<'a> {
pub path: Option<Vec<ImportExport<'a>>>,
}
Expand description
An (optional) path through the imports/exports of a current
component/context. Not in the spec; only used for
BoundedTyvar::origin
below.
Fields§
§path: Option<Vec<ImportExport<'a>>>
Note that the most recent (closest) element is last
Implementations§
Source§impl<'a> TyvarOrigin<'a>
impl<'a> TyvarOrigin<'a>
pub fn new() -> Self
pub fn push(&self, x: Option<ImportExport<'a>>) -> Self
pub fn matches<I: Iterator<Item = &'a ImportExport<'a>>>(&self, path: I) -> bool
pub fn is_local<I: DoubleEndedIterator<Item = &'a ImportExport<'a>> + ExactSizeIterator<Item = &'a ImportExport<'a>>>( &self, path: I, ) -> Option<Vec<ImportExport<'a>>>
pub fn last_name(&self) -> Option<&'a str>
pub fn is_imported(&self) -> bool
Trait Implementations§
Source§impl<'a> Clone for TyvarOrigin<'a>
impl<'a> Clone for TyvarOrigin<'a>
Source§fn clone(&self) -> TyvarOrigin<'a>
fn clone(&self) -> TyvarOrigin<'a>
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 moreSource§impl<'a> Debug for TyvarOrigin<'a>
impl<'a> Debug for TyvarOrigin<'a>
Source§impl<'a> Default for TyvarOrigin<'a>
impl<'a> Default for TyvarOrigin<'a>
Source§fn default() -> TyvarOrigin<'a>
fn default() -> TyvarOrigin<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> PartialEq for TyvarOrigin<'a>
impl<'a> PartialEq for TyvarOrigin<'a>
impl<'a> StructuralPartialEq for TyvarOrigin<'a>
Auto Trait Implementations§
impl<'a> Freeze for TyvarOrigin<'a>
impl<'a> RefUnwindSafe for TyvarOrigin<'a>
impl<'a> Send for TyvarOrigin<'a>
impl<'a> Sync for TyvarOrigin<'a>
impl<'a> Unpin for TyvarOrigin<'a>
impl<'a> UnwindSafe for TyvarOrigin<'a>
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