pub struct ArgDataFields {
pub code: Option<String>,
pub syntax: Option<ArgStdKind>,
pub name: Option<String>,
pub layout: ArgLayout,
pub opaque_wrapper: bool,
pub docs: String,
pub mode: Option<Mode>,
pub scoped: Vec<Name>,
pub role: Option<Name>,
}Expand description
An argument written as a map in settings given as data: its syntax, given
as a code or as a structured syntax, exactly one of the two, and its name,
parsing mode, layout, opaque wrapper, scoped packages, documentation and
role (see ArgData).
Fields§
§code: Option<String>The argument code, which says what form the argument takes in one
short text (the codes are those arg_def_from_code reads). A map
gives either a code or a structured syntax.
syntax: Option<ArgStdKind>The structured syntax: the standard kind (ArgStdKind) written as
data, its name under the key syntax and its parameters beside it, in
the map itself. A map gives either a code or a structured syntax.
name: Option<String>The argument’s name, by which a user definition’s template refers to it. No name by default.
layout: ArgLayoutHow the argument’s content is laid out: inline (running text with
no paragraph, the default), blocks (paragraphs and other blocks), or
inline-or-blocks (decided by the content); see ArgLayout.
opaque_wrapper: boolWhether the argument’s content is placed under an opaque wrapper, so
that it is kept as written: no whitespace is collapsed and no
typographic substitution is made inside it. false by default; see
ArgDef::with_opaque_wrapper.
docs: StringDocumentation of the argument. Empty by default.
mode: Option<Mode>The parsing mode the argument is read in: text or math. Without
it, the argument is read in the mode the command is written in; see
ArgDef::mode.
scoped: Vec<Name>The names of the scoped packages whose
declarations are available inside the argument. None by default; see
ArgDef::scoped.
role: Option<Name>The argument’s role: the registered name of what the argument holds,
such as flm.refs.target for a label that a reference points to. No
role by default; see ArgDef::role.
Trait Implementations§
Source§impl Clone for ArgDataFields
impl Clone for ArgDataFields
Source§impl Debug for ArgDataFields
impl Debug for ArgDataFields
Source§impl<'de> Deserialize<'de> for ArgDataFields
impl<'de> Deserialize<'de> for ArgDataFields
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ArgDataFields
Source§impl From<&ArgDef> for ArgDataFields
Writes a declaration as an argument’s map, as ArgDef::code states a
declaration is written back: with the code it was read from, when it has
one; otherwise with the structured syntax of its parser’s standard kind
(FlmArgumentParser::std_kind);
otherwise with neither, for a parser of a feature’s own. A map written
with neither does not read back. The declaration’s other fields are
copied.
impl From<&ArgDef> for ArgDataFields
Writes a declaration as an argument’s map, as ArgDef::code states a
declaration is written back: with the code it was read from, when it has
one; otherwise with the structured syntax of its parser’s standard kind
(FlmArgumentParser::std_kind);
otherwise with neither, for a parser of a feature’s own. A map written
with neither does not read back. The declaration’s other fields are
copied.
Source§fn from(arg: &ArgDef) -> ArgDataFields
fn from(arg: &ArgDef) -> ArgDataFields
Source§impl JsonSchema for ArgDataFields
impl JsonSchema for ArgDataFields
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ArgDataFields
impl PartialEq for ArgDataFields
Source§impl Serialize for ArgDataFields
impl Serialize for ArgDataFields
impl StructuralPartialEq for ArgDataFields
Auto Trait Implementations§
impl !RefUnwindSafe for ArgDataFields
impl !UnwindSafe for ArgDataFields
impl Forget for ArgDataFields
impl Freeze for ArgDataFields
impl Move for ArgDataFields
impl Send for ArgDataFields
impl Sync for ArgDataFields
impl Unpin for ArgDataFields
impl UnsafeUnpin for ArgDataFields
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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