pub struct EnvironmentItem {
pub name: String,
pub allowed_mode: AllowedMode,
pub body_mode: ContentMode,
pub spec: String,
pub tags: Vec<String>,
}Expand description
Runtime environment definition to be injected into a ParseContext.
Fields§
§name: StringEnvironment name (e.g. "matrix", "align")
allowed_mode: AllowedModeWhich content modes this environment may appear in
body_mode: ContentModeContent mode used to parse the environment body
spec: Stringxparse-style argument specification string
Metadata tags for transform-stage filtering
Implementations§
Source§impl EnvironmentItem
impl EnvironmentItem
Sourcepub fn new(
name: impl Into<String>,
allowed_mode: AllowedMode,
body_mode: ContentMode,
spec: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, allowed_mode: AllowedMode, body_mode: ContentMode, spec: impl Into<String>, ) -> Self
Create an environment item with no tags.
Builder method to attach metadata tags.
Trait Implementations§
Source§impl Clone for EnvironmentItem
impl Clone for EnvironmentItem
Source§fn clone(&self) -> EnvironmentItem
fn clone(&self) -> EnvironmentItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnvironmentItem
impl Debug for EnvironmentItem
impl Eq for EnvironmentItem
Source§impl From<EnvironmentItem> for ContextItem
impl From<EnvironmentItem> for ContextItem
Source§fn from(item: EnvironmentItem) -> Self
fn from(item: EnvironmentItem) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EnvironmentItem
impl PartialEq for EnvironmentItem
Source§fn eq(&self, other: &EnvironmentItem) -> bool
fn eq(&self, other: &EnvironmentItem) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EnvironmentItem
Auto Trait Implementations§
impl Freeze for EnvironmentItem
impl RefUnwindSafe for EnvironmentItem
impl Send for EnvironmentItem
impl Sync for EnvironmentItem
impl Unpin for EnvironmentItem
impl UnsafeUnpin for EnvironmentItem
impl UnwindSafe for EnvironmentItem
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<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
Compare self to
key and return true if they are equal.