pub enum ExpressionStoreOwnerId {
Signature(GenericDefId),
Body(DefWithBodyId),
VariantFields(VariantId),
}Expand description
Owner of an expression store - either a body or a signature.
This is used for queries that operate on expression stores generically,
such as expr_scopes.
Variants§
Signature(GenericDefId)
Body(DefWithBodyId)
A body, something with a root expression.
An enum variant’s body is considered its discriminant initializer.
VariantFields(VariantId)
Implementations§
Source§impl ExpressionStoreOwnerId
impl ExpressionStoreOwnerId
pub fn as_def_with_body(self) -> Option<DefWithBodyId>
pub fn generic_def(self, db: &dyn SourceDatabase) -> GenericDefId
Trait Implementations§
Source§impl Clone for ExpressionStoreOwnerId
impl Clone for ExpressionStoreOwnerId
Source§fn clone(&self) -> ExpressionStoreOwnerId
fn clone(&self) -> ExpressionStoreOwnerId
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 Copy for ExpressionStoreOwnerId
Source§impl Debug for ExpressionStoreOwnerId
impl Debug for ExpressionStoreOwnerId
impl Eq for ExpressionStoreOwnerId
Source§impl From<DefWithBodyId> for ExpressionStoreOwnerId
impl From<DefWithBodyId> for ExpressionStoreOwnerId
Source§fn from(id: DefWithBodyId) -> Self
fn from(id: DefWithBodyId) -> Self
Converts to this type from the input type.
Source§impl From<GenericDefId> for ExpressionStoreOwnerId
impl From<GenericDefId> for ExpressionStoreOwnerId
Source§fn from(id: GenericDefId) -> Self
fn from(id: GenericDefId) -> Self
Converts to this type from the input type.
Source§impl From<ImplId> for ExpressionStoreOwnerId
impl From<ImplId> for ExpressionStoreOwnerId
Source§impl From<VariantId> for ExpressionStoreOwnerId
impl From<VariantId> for ExpressionStoreOwnerId
Source§impl HasModule for ExpressionStoreOwnerId
impl HasModule for ExpressionStoreOwnerId
Source§impl HasResolver for ExpressionStoreOwnerId
impl HasResolver for ExpressionStoreOwnerId
Source§impl Hash for ExpressionStoreOwnerId
impl Hash for ExpressionStoreOwnerId
Source§impl Ord for ExpressionStoreOwnerId
impl Ord for ExpressionStoreOwnerId
Source§fn cmp(&self, other: &ExpressionStoreOwnerId) -> Ordering
fn cmp(&self, other: &ExpressionStoreOwnerId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ExpressionStoreOwnerId
impl PartialEq for ExpressionStoreOwnerId
Source§impl PartialOrd for ExpressionStoreOwnerId
impl PartialOrd for ExpressionStoreOwnerId
impl StructuralPartialEq for ExpressionStoreOwnerId
Auto Trait Implementations§
impl Freeze for ExpressionStoreOwnerId
impl RefUnwindSafe for ExpressionStoreOwnerId
impl Send for ExpressionStoreOwnerId
impl Sync for ExpressionStoreOwnerId
impl Unpin for ExpressionStoreOwnerId
impl UnsafeUnpin for ExpressionStoreOwnerId
impl UnwindSafe for ExpressionStoreOwnerId
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<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
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> ⓘ
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