pub struct ConstId {
pub name: String,
pub crate_name: Option<String>,
}Expand description
A #[prebindgen] const, identified the way the flat namespace identifies
everything: by name, plus the crate it was marked in.
Fields§
§name: String§crate_name: Option<String>Crate the const was declared in, resolved by looking the name up among the captured consts — never assumed from the use site. That is what lets an extent refuse a const from another source crate.
A bare crate name, not an Origin: it describes a different item
than the one being lowered, so it is not that node’s provenance.
Trait Implementations§
impl Eq for ConstId
impl StructuralPartialEq for ConstId
Auto Trait Implementations§
impl Freeze for ConstId
impl RefUnwindSafe for ConstId
impl Send for ConstId
impl Sync for ConstId
impl Unpin for ConstId
impl UnsafeUnpin for ConstId
impl UnwindSafe for ConstId
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