pub struct Reference { /* private fields */ }Expand description
A ${...} reference read outside a template: the field it names and the
accessors that slice it, validated against the pattern’s capture names as
a template’s are, so a callback reads e:domain or 0:last4 as a
template renders it.
Implementations§
Source§impl Reference
impl Reference
Sourcepub fn parse(body: &str, bound: &[String]) -> Result<Reference, TemplateError>
pub fn parse(body: &str, bound: &[String]) -> Result<Reference, TemplateError>
Parse the body a template writes inside ${...}: 0, a register’s
name or its position among bound, and the accessors after a colon.
§Errors
A name the pattern binds no register under, a position past the last it binds, or an accessor that is not one.
Trait Implementations§
impl Eq for Reference
impl StructuralPartialEq for Reference
Auto Trait Implementations§
impl Freeze for Reference
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnsafeUnpin for Reference
impl UnwindSafe for Reference
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