[−][src]Struct bracket::parser::ast::Call
Call is a variable interpolation, helper invocation or partial render.
A call has zero or more arguments and optional hash parameters.
The partial flag is used to indicate that this call should be rendered as a partial.
Implementations
impl<'source> Call<'source>
[src]
pub fn new(source: &'source str, open: Range<usize>) -> Self
[src]
Create an open call.
If it is correctly terminated the parser will call exit()
to terminate
the call statement.
pub fn is_empty(&self) -> bool
[src]
Determine if the target for this call is empty.
pub fn target(&self) -> &CallTarget<'source>
[src]
Get the call target.
pub fn has_target(&self) -> bool
[src]
Determine if a call target is available.
pub fn set_target(&mut self, target: CallTarget<'source>)
[src]
Set the call target.
pub fn add_argument(&mut self, arg: ParameterValue<'source>)
[src]
Add an argument to this call.
pub fn arguments(&self) -> &Vec<ParameterValue<'source>>
[src]
Get the list of arguments.
pub fn add_hash(&mut self, key: &'source str, val: ParameterValue<'source>)
[src]
Add a hash parameter to this call.
pub fn hash(&self) -> &HashMap<&'source str, ParameterValue<'source>>
[src]
Get the map of hash parameters.
pub fn is_partial(&self) -> bool
[src]
Determine if this call has the partial flag.
pub fn set_partial(&mut self, partial: bool)
[src]
Set the partial flag.
pub fn is_conditional(&self) -> bool
[src]
Determine if this call has a conditional flag (the else
keyword).
pub fn set_conditional(&mut self, conditional: bool)
[src]
Set the conditional flag.
pub fn is_escaped(&self) -> bool
[src]
Determine if the content of this call should be escaped.
Trait Implementations
impl<'_> Debug for Call<'_>
[src]
impl<'source> Default for Call<'source>
[src]
impl<'_> Display for Call<'_>
[src]
impl<'source> Element<'source> for Call<'source>
[src]
fn open(&self) -> &'source str
[src]
fn close(&self) -> &'source str
[src]
fn open_span(&self) -> &Range<usize>
[src]
fn close_span(&self) -> &Option<Range<usize>>
[src]
fn is_closed(&self) -> bool
[src]
fn exit(&mut self, close: Range<usize>)
[src]
fn span(&self) -> Range<usize>
[src]
impl<'source> Eq for Call<'source>
[src]
impl<'source> PartialEq<Call<'source>> for Call<'source>
[src]
impl<'source> Slice<'source> for Call<'source>
[src]
impl<'source> StructuralEq for Call<'source>
[src]
impl<'source> StructuralPartialEq for Call<'source>
[src]
Auto Trait Implementations
impl<'source> RefUnwindSafe for Call<'source>
impl<'source> Send for Call<'source>
impl<'source> Sync for Call<'source>
impl<'source> Unpin for Call<'source>
impl<'source> UnwindSafe for Call<'source>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,