Struct Delimiters
pub struct Delimiters { pub block_start: Cow<'static, str>, pub block_end: Cow<'static, str>, pub variable_start: Cow<'static, str>, pub variable_end: Cow<'static, str>, pub comment_start: Cow<'static, str>, pub comment_end: Cow<'static, str> }
This allows customizing the delimiters used for blocks, variables, and comments in case
you want to template files that contains text like {{, like LaTeX.
Delimiters need to be exactly 2 bytes long (e.g. {{, «).
Fields
block_start: Cow<'static, str>Start delimiter for blocks, default:
{%block_end: Cow<'static, str>End delimiter for blocks, default:
%}variable_start: Cow<'static, str>Start delimiter for variables, default:
{{variable_end: Cow<'static, str>End delimiter for variables, default:
}}comment_start: Cow<'static, str>Start delimiter for comments, default:
{#comment_end: Cow<'static, str>End delimiter for comments, default:
#}
Trait Implementations
impl Clone for Delimiters
fn clone(&self) -> Delimiters
impl Debug for Delimiters
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for Delimiters
fn default() -> Self
impl Eq for Delimiters
impl PartialEq for Delimiters
fn eq(&self, other: &Delimiters) -> bool
impl StructuralPartialEq for Delimiters
Auto Trait Implementations
impl Freeze for Delimiters
impl RefUnwindSafe for Delimiters
impl Send for Delimiters
impl Sync for Delimiters
impl Unpin for Delimiters
impl UnsafeUnpin for Delimiters
impl UnwindSafe for Delimiters
Blanket Implementations
impl<T> Any for Delimiters
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Delimiters
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Delimiters
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Delimiters
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Delimiters
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Delimiters
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Delimiters
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Delimiters
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Delimiters
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>