pub struct GlobalEntry {
pub name: String,
pub expr: String,
pub persist: bool,
}Expand description
A parsed .blade.xr template, before layout resolution.
Expression text (expr, cond, iter) is kept as raw strings here -
this crate is pure text parsing with no syn/proc-macro2 dependency.
larust-macros parses those strings into real syn::Exprs at codegen
time, which is also what makes {{ user.name }} a genuine, type-checked
Rust expression rather than a custom mini-language.
One name = expr line inside a @globals ... @endglobals block -
see Node::Globals. persist marks a persist name = expr line
(persist is a line prefix, not a separate directive), meaning expr
is only ever the fallback used when the browser hasn’t set the
corresponding preference cookie yet - see Node::PersistGlobal.
Fields§
§name: String§expr: String§persist: boolTrait Implementations§
Source§impl Clone for GlobalEntry
impl Clone for GlobalEntry
Source§impl Debug for GlobalEntry
impl Debug for GlobalEntry
impl Eq for GlobalEntry
Source§impl PartialEq for GlobalEntry
impl PartialEq for GlobalEntry
impl StructuralPartialEq for GlobalEntry
Auto Trait Implementations§
impl Freeze for GlobalEntry
impl RefUnwindSafe for GlobalEntry
impl Send for GlobalEntry
impl Sync for GlobalEntry
impl Unpin for GlobalEntry
impl UnsafeUnpin for GlobalEntry
impl UnwindSafe for GlobalEntry
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