Struct EditionedFileId
pub struct EditionedFileId(/* private fields */);Implementations§
§impl EditionedFileId
impl EditionedFileId
pub fn ingredient(zalsa: &Zalsa) -> &IngredientImpl<EditionedFileId>
§impl EditionedFileId
impl EditionedFileId
pub fn from_span( db: &(impl Database + ?Sized), editioned_file_id: EditionedFileId, krate: Crate, ) -> EditionedFileId
pub fn from_span_guess_origin(
db: &(dyn RootQueryDb + 'static),
editioned_file_id: EditionedFileId,
) -> EditionedFileId
pub fn from_span_guess_origin( db: &(dyn RootQueryDb + 'static), editioned_file_id: EditionedFileId, ) -> EditionedFileId
Guesses the crate for the file.
Only use this if you cannot precisely determine the origin. This can happen in one of two cases:
- The file is not in the module tree.
- You are latency sensitive and cannot afford calling the def map to precisely compute the origin (e.g. on enter feature, folding, etc.).
pub fn editioned_file_id(self, db: &(dyn Database + 'static)) -> EditionedFileId
pub fn krate(self, db: &(dyn Database + 'static)) -> Crate
pub fn default_debug_fmt(
this: EditionedFileId,
f: &mut Formatter<'_>,
) -> Result<(), Error>
pub fn default_debug_fmt( this: EditionedFileId, f: &mut Formatter<'_>, ) -> Result<(), Error>
Default debug formatting for this struct (may be useful if you define your own Debug impl)
§impl EditionedFileId
impl EditionedFileId
pub fn new( db: &(dyn Database + 'static), file_id: FileId, edition: Edition, krate: Crate, ) -> EditionedFileId
pub fn current_edition_guess_origin(
db: &(dyn RootQueryDb + 'static),
file_id: FileId,
) -> EditionedFileId
pub fn current_edition_guess_origin( db: &(dyn RootQueryDb + 'static), file_id: FileId, ) -> EditionedFileId
Attaches the current edition and guesses the crate for the file.
Only use this if you cannot precisely determine the origin. This can happen in one of two cases:
- The file is not in the module tree.
- You are latency sensitive and cannot afford calling the def map to precisely compute the origin (e.g. on enter feature, folding, etc.).
pub fn file_id(self, db: &(dyn Database + 'static)) -> FileId
pub fn unpack(self, db: &(dyn Database + 'static)) -> (FileId, Edition)
pub fn edition(self, db: &(dyn Database + 'static)) -> Edition
Trait Implementations§
§impl Clone for EditionedFileId
impl Clone for EditionedFileId
§fn clone(&self) -> EditionedFileId
fn clone(&self) -> EditionedFileId
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 more§impl Debug for EditionedFileId
impl Debug for EditionedFileId
§impl From<EditionedFileId> for HirFileId
impl From<EditionedFileId> for HirFileId
§fn from(file_id: EditionedFileId) -> HirFileId
fn from(file_id: EditionedFileId) -> HirFileId
Converts to this type from the input type.
§impl Hash for EditionedFileId
impl Hash for EditionedFileId
§impl Ord for EditionedFileId
impl Ord for EditionedFileId
§impl PartialEq<EditionedFileId> for HirFileId
impl PartialEq<EditionedFileId> for HirFileId
§impl PartialEq<HirFileId> for EditionedFileId
impl PartialEq<HirFileId> for EditionedFileId
§impl PartialEq for EditionedFileId
impl PartialEq for EditionedFileId
§impl PartialOrd for EditionedFileId
impl PartialOrd for EditionedFileId
§impl Update for EditionedFileId
impl Update for EditionedFileId
§unsafe fn maybe_update(
old_pointer: *mut EditionedFileId,
new_value: EditionedFileId,
) -> bool
unsafe fn maybe_update( old_pointer: *mut EditionedFileId, new_value: EditionedFileId, ) -> bool
Returns Read more
impl Copy for EditionedFileId
impl Eq for EditionedFileId
impl Send for EditionedFileId
impl StructuralPartialEq for EditionedFileId
impl Sync for EditionedFileId
Auto Trait Implementations§
impl Freeze for EditionedFileId
impl !RefUnwindSafe for EditionedFileId
impl Unpin for EditionedFileId
impl !UnwindSafe for EditionedFileId
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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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