pub(crate) struct PathCompletionCtx<'db> {
pub(crate) has_call_parens: bool,
pub(crate) has_macro_bang: bool,
pub(crate) qualified: Qualified<'db>,
pub(crate) parent: Option<Path>,
pub(crate) path: Path,
pub(crate) original_path: Option<Path>,
pub(crate) kind: PathKind<'db>,
pub(crate) has_type_args: bool,
pub(crate) use_tree_parent: bool,
}Expand description
The state of the path we are currently completing.
Fields§
§has_call_parens: boolIf this is a call with () already there (or {} in case of record patterns)
has_macro_bang: boolIf this has a macro call bang !
qualified: Qualified<'db>The qualifier of the current path.
parent: Option<Path>The parent of the path we are completing.
path: PathThe path of which we are completing the segment
original_path: Option<Path>The path of which we are completing the segment in the original file
kind: PathKind<'db>§has_type_args: boolWhether the path segment has type args or not.
use_tree_parent: boolWhether the qualifier comes from a use tree parent or not
Implementations§
Source§impl PathCompletionCtx<'_>
impl PathCompletionCtx<'_>
pub(crate) fn is_trivial_path(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'db> Freeze for PathCompletionCtx<'db>
impl<'db> !RefUnwindSafe for PathCompletionCtx<'db>
impl<'db> !Send for PathCompletionCtx<'db>
impl<'db> !Sync for PathCompletionCtx<'db>
impl<'db> Unpin for PathCompletionCtx<'db>
impl<'db> !UnwindSafe for PathCompletionCtx<'db>
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
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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