pub struct DirectiveSyntax {
pub name: String,
pub required_arguments: u32,
pub optional_arguments: u32,
pub final_argument_whitespace: bool,
pub argument: ArgumentSyntax,
pub options: BTreeMap<String, OptionSyntax>,
pub content: ContentSyntax,
}Expand description
A directive: what it accepts, so parsers can split its parts.
Fields§
§name: StringThe directive’s name, in lower case, e.g. "versionadded".
required_arguments: u32How many arguments it requires.
optional_arguments: u32How many more arguments it accepts.
final_argument_whitespace: boolWhether the last argument may contain whitespace (it takes the rest of the argument text).
argument: ArgumentSyntaxHow the argument is read.
options: BTreeMap<String, OptionSyntax>The options it accepts, by name.
content: ContentSyntaxWhat its content is.
Trait Implementations§
Source§impl Clone for DirectiveSyntax
impl Clone for DirectiveSyntax
Source§impl Debug for DirectiveSyntax
impl Debug for DirectiveSyntax
Source§impl Default for DirectiveSyntax
impl Default for DirectiveSyntax
Source§impl<'de> Deserialize<'de> for DirectiveSyntax
impl<'de> Deserialize<'de> for DirectiveSyntax
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DirectiveSyntax
impl PartialEq for DirectiveSyntax
Source§impl Serialize for DirectiveSyntax
impl Serialize for DirectiveSyntax
impl StructuralPartialEq for DirectiveSyntax
Auto Trait Implementations§
impl Forget for DirectiveSyntax
impl Freeze for DirectiveSyntax
impl Move for DirectiveSyntax
impl RefUnwindSafe for DirectiveSyntax
impl Send for DirectiveSyntax
impl Sync for DirectiveSyntax
impl Unpin for DirectiveSyntax
impl UnsafeUnpin for DirectiveSyntax
impl UnwindSafe for DirectiveSyntax
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