pub struct Guard {
pub origin: Origin<ItemConst>,
}Expand description
An anonymous const: const _: T = .., whatever produced it.
The definition is the shape, not the origin. A const with no name has no
address, so nothing can declare it, reference it, or emit it as an alias —
which is what puts it outside the flat API rather than in it, and that holds
however the item arrived: synthesized, hand-fed to FlatBuilder, or written
as #[prebindgen] const _: () = .. in a source crate.
Today’s producer is Source’s cfg filter, which
synthesizes const _: () = { konst::assertc_eq!(..) } to assert that a source
crate’s FEATURES match what the build script asked for. Nothing marked
that one — it is prebindgen’s own item riding the same stream — but it is not
the only thing that can land here, and the model does not claim otherwise.
Cardinality is zero or more. enable_feature_filtering(None) produces
none, and each item iterator taken from a Source emits its own, so composing
two iterators from one crate yields two.
It carries no type, unlike a Constant. The item is emitted verbatim, so
what its types mean is the consumer crate’s business; modelling them would let
a guard that names something undeclared refuse the whole element.
Fields§
§origin: Origin<ItemConst>Emitted verbatim, so the item is all there is.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Guard
impl !Sync for Guard
impl Freeze for Guard
impl RefUnwindSafe for Guard
impl Unpin for Guard
impl UnsafeUnpin for Guard
impl UnwindSafe for Guard
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
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> ⓘ
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> ⓘ
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