[][src]Struct bracket::parser::ast::Call

pub struct Call<'source> { /* fields omitted */ }

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.