pub struct HeredocTemplate {
pub delimiter: Ident,
pub template: Template,
/* private fields */
}
Expand description
A heredoc template is introduced by a <<
sequence and defines a template via a multi-line
sequence terminated by a user-chosen delimiter.
Fields§
§delimiter: Ident
The delimiter identifier that denotes the heredoc start and end.
template: Template
The raw template contained in the heredoc.
Implementations§
Source§impl HeredocTemplate
impl HeredocTemplate
Sourcepub fn new(delimiter: Ident, template: Template) -> HeredocTemplate
pub fn new(delimiter: Ident, template: Template) -> HeredocTemplate
Creates a new HeredocTemplate
for a delimiter and a template.
Sourcepub fn set_indent(&mut self, indent: usize)
pub fn set_indent(&mut self, indent: usize)
Set the heredoc’s indent.
Sourcepub fn trailing(&self) -> &RawString
pub fn trailing(&self) -> &RawString
Return a reference to the raw trailing decor before the heredoc’s closing delimiter.
Sourcepub fn set_trailing(&mut self, trailing: impl Into<RawString>)
pub fn set_trailing(&mut self, trailing: impl Into<RawString>)
Set the raw trailing decor before the heredoc’s closing delimiter.
Trait Implementations§
Source§impl Clone for HeredocTemplate
impl Clone for HeredocTemplate
Source§fn clone(&self) -> HeredocTemplate
fn clone(&self) -> HeredocTemplate
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HeredocTemplate
impl Debug for HeredocTemplate
Source§impl Decorate for HeredocTemplate
impl Decorate for HeredocTemplate
Source§impl From<HeredocTemplate> for Expression
impl From<HeredocTemplate> for Expression
Source§fn from(value: HeredocTemplate) -> Self
fn from(value: HeredocTemplate) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HeredocTemplate
impl PartialEq for HeredocTemplate
Source§impl Span for HeredocTemplate
impl Span for HeredocTemplate
impl Eq for HeredocTemplate
Auto Trait Implementations§
impl Freeze for HeredocTemplate
impl RefUnwindSafe for HeredocTemplate
impl Send for HeredocTemplate
impl Sync for HeredocTemplate
impl Unpin for HeredocTemplate
impl UnwindSafe for HeredocTemplate
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