pub struct ArgumentRef<'a> {
pub declaration: &'a ElementDef,
pub within: Option<&'a ScopedPackageDef>,
pub field: Option<&'a TackOnField>,
pub index: usize,
pub arg: &'a ArgDef,
}Expand description
One argument declaration among a registry’s Declarations, with where
it is declared: the element declaration it belongs to, the scoped package
that holds that declaration, and the tack-on field whose own argument list
holds it.
Declarations::arguments and Declarations::role_uses return it.
Fields§
§declaration: &'a ElementDefThe element declaration the argument belongs to. Its
owner is the feature that declared it.
within: Option<&'a ScopedPackageDef>The scoped package that holds the element declaration, or None for
a declaration a feature made directly
(FeatureBuilder::element).
field: Option<&'a TackOnField>The tack-on field whose own argument list holds the
argument (the innermost one, for a field written in another field’s
argument), or None for an argument of the element declaration
itself.
index: usizeThe argument’s position, counting from zero, in the argument list that holds it: the element declaration’s own, or the field’s.
arg: &'a ArgDefThe argument declaration.
Trait Implementations§
Source§impl<'a> Clone for ArgumentRef<'a>
impl<'a> Clone for ArgumentRef<'a>
impl<'a> Copy for ArgumentRef<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ArgumentRef<'a>
impl<'a> !UnwindSafe for ArgumentRef<'a>
impl<'a> Forget for ArgumentRef<'a>
impl<'a> Freeze for ArgumentRef<'a>where
&'a ElementDef: Freeze,
&'a ScopedPackageDef: Freeze,
&'a TackOnField: Freeze,
&'a ArgDef: Freeze,
impl<'a> Move for ArgumentRef<'a>
impl<'a> Send for ArgumentRef<'a>
impl<'a> Sync for ArgumentRef<'a>where
Arc<str>: Sync,
RawVecInner: Sync,
Arc<dyn FlmArgumentParser>: Sync,
Arc<dyn FlmBodyParser>: Sync,
Arc<ElementSpec>: Sync,
impl<'a> Unpin for ArgumentRef<'a>where
&'a ElementDef: Unpin,
&'a ScopedPackageDef: Unpin,
&'a TackOnField: Unpin,
&'a ArgDef: Unpin,
impl<'a> UnsafeUnpin for ArgumentRef<'a>where
&'a ElementDef: UnsafeUnpin,
&'a ScopedPackageDef: UnsafeUnpin,
&'a TackOnField: UnsafeUnpin,
&'a ArgDef: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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