pub struct TemplateCommandRule {
pub escape_char: char,
pub name_chars: String,
}Expand description
One command syntax that stays recognized inside restricted arguments and verbatim regions during the parse of a template: an escape character, and the characters that may follow it to form a command name.
This is techy’s CommandRule as plain data, so that a policy can be
declared and serialized without holding a parser type.
Serialized form: {escape_char, name_chars}.
Fields§
§escape_char: charThe escape character that starts the command.
name_chars: StringThe characters that form a multi-character name after the escape character; empty when only single-character names exist.
Trait Implementations§
Source§impl Clone for TemplateCommandRule
impl Clone for TemplateCommandRule
Source§impl Debug for TemplateCommandRule
impl Debug for TemplateCommandRule
Source§impl<__L: Lang> DeserializableValue<__L> for TemplateCommandRule
impl<__L: Lang> DeserializableValue<__L> for TemplateCommandRule
Source§fn deserialize_value(
__value: &SerialValue,
__cx: &mut DeserializeContext<'_, __L>,
) -> Result<Self, DeserializeError>where
__L: SerializableLang,
fn deserialize_value(
__value: &SerialValue,
__cx: &mut DeserializeContext<'_, __L>,
) -> Result<Self, DeserializeError>where
__L: SerializableLang,
Rebuild the value from its serialized form.
cx gives the call access to the
state of the deserialization in progress. Read moreSource§fn deserialize_field(
name: &'static str,
value: Option<&SerialValue>,
cx: &mut DeserializeContext<'_, L>,
) -> Result<Self, DeserializeError>where
L: SerializableLang,
fn deserialize_field(
name: &'static str,
value: Option<&SerialValue>,
cx: &mut DeserializeContext<'_, L>,
) -> Result<Self, DeserializeError>where
L: SerializableLang,
Rebuild this value as the field
name of a structure whose fields are read by
name (a type with #[derive(DeserializableValue)]): value is the field’s
value, or None when the key is missing from the map. The default requires
the key and reads its value with deserialize_value;
Option<T> reads a missing key as None. The counterpart of
SerializableValue::is_absent_field: a type overriding one overrides both. Read moreSource§impl<'de> Deserialize<'de> for TemplateCommandRule
impl<'de> Deserialize<'de> for TemplateCommandRule
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
impl Eq for TemplateCommandRule
Source§impl PartialEq for TemplateCommandRule
impl PartialEq for TemplateCommandRule
Source§impl<__L: Lang> SerializableValue<__L> for TemplateCommandRule
impl<__L: Lang> SerializableValue<__L> for TemplateCommandRule
Source§fn serialize_value(
&self,
__cx: &mut SerializeContext<'_, __L>,
) -> Result<SerialValue, SerializeError>where
__L: SerializableLang,
fn serialize_value(
&self,
__cx: &mut SerializeContext<'_, __L>,
) -> Result<SerialValue, SerializeError>where
__L: SerializableLang,
Produce this value’s serialized form.
cx gives the call access to the state
of the serialization in progress — a value that refers to a table object
(a span’s source, say) interns it through cx and embeds the position. Read moreSource§fn is_absent_field(&self) -> boolwhere
L: SerializableLang,
fn is_absent_field(&self) -> boolwhere
L: SerializableLang,
Whether this value, as a field of a structure whose fields are written by name
(a type with
#[derive(SerializableValue)]), is left out of the structure’s map
entirely — no key at all, rather than a key with a null value. The default is
false; Option<T> is absent when it is None. Read moreSource§impl Serialize for TemplateCommandRule
impl Serialize for TemplateCommandRule
impl StructuralPartialEq for TemplateCommandRule
Auto Trait Implementations§
impl Forget for TemplateCommandRule
impl Freeze for TemplateCommandRule
impl Move for TemplateCommandRule
impl RefUnwindSafe for TemplateCommandRule
impl Send for TemplateCommandRulewhere
RawVecInner: Send,
impl Sync for TemplateCommandRulewhere
RawVecInner: Sync,
impl Unpin for TemplateCommandRule
impl UnsafeUnpin for TemplateCommandRule
impl UnwindSafe for TemplateCommandRulewhere
RawVecInner: UnwindSafe,
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
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>,
Casts the value.
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>
Casts the value.
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
Compare self to
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.