pub struct PartialRes<Id = ParamId> {
base_res: Res<Id>,
unresolved_segments: usize,
}Expand description
See [rustc_hir::def::PartialRes]
Fields§
§base_res: Res<Id>§unresolved_segments: usizeImplementations§
Source§impl<Id: Copy> PartialRes<Id>
impl<Id: Copy> PartialRes<Id>
pub fn new(base_res: Res<Id>) -> Self
pub fn with_unresolved_segments( base_res: Res<Id>, unresolved_segments: usize, ) -> Self
pub fn base_res(&self) -> Res<Id>
pub fn unresolved_segments(&self) -> usize
pub fn full_res(&self) -> Option<Res<Id>>
pub fn expect_full_res(&self) -> Res<Id>
pub fn is_box(&self, tcx: TyCtxt<'_>) -> bool
pub fn map_param_id<R>(&self, f: impl FnOnce(Id) -> R) -> PartialRes<R>
Trait Implementations§
Source§impl<Id: Clone> Clone for PartialRes<Id>
impl<Id: Clone> Clone for PartialRes<Id>
Source§fn clone(&self) -> PartialRes<Id>
fn clone(&self) -> PartialRes<Id>
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<Id: Copy> Copy for PartialRes<Id>
Auto Trait Implementations§
impl<Id> DynSend for PartialRes<Id>where
Id: DynSend,
impl<Id> DynSync for PartialRes<Id>where
Id: DynSync,
impl<Id> Freeze for PartialRes<Id>where
Id: Freeze,
impl<Id> RefUnwindSafe for PartialRes<Id>where
Id: RefUnwindSafe,
impl<Id> Send for PartialRes<Id>where
Id: Send,
impl<Id> Sync for PartialRes<Id>where
Id: Sync,
impl<Id> Unpin for PartialRes<Id>where
Id: Unpin,
impl<Id> UnsafeUnpin for PartialRes<Id>where
Id: UnsafeUnpin,
impl<Id> UnwindSafe for PartialRes<Id>where
Id: UnwindSafe,
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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§impl<K> IntoQueryKey<K> for K
impl<K> IntoQueryKey<K> for K
§fn into_query_key(self) -> K
fn into_query_key(self) -> K
Argument conversion from
Self to K.
This should always be a very cheap conversion, e.g. [LocalDefId::to_def_id].