pub struct DocumentFunction {
pub call: String,
pub args: HashMap<String, DocumentNode>,
pub content: DocumentNode,
}Expand description
DocumentFunction is a function call in the text document. For example,
{text[style=bold] message} is a DocumentFunction with name “text”,
args such that style is associated with DocumentNode::Text “bold”
and content is given as DocumentNode::Text “message”.
Fields§
§call: String§args: HashMap<String, DocumentNode>§content: DocumentNodeImplementations§
Source§impl DocumentFunction
impl DocumentFunction
Sourcepub fn new() -> DocumentFunction
pub fn new() -> DocumentFunction
Returns an empty DocumentFunction without args or content and name is set to “”.
Sourcepub fn empty_element() -> DocumentElement
pub fn empty_element() -> DocumentElement
Returns an empty DocumentElement::Function without args or content and name is set to “”.
Trait Implementations§
Source§impl Clone for DocumentFunction
impl Clone for DocumentFunction
Source§fn clone(&self) -> DocumentFunction
fn clone(&self) -> DocumentFunction
Returns a duplicate 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 DocumentFunction
impl Debug for DocumentFunction
Source§impl Default for DocumentFunction
impl Default for DocumentFunction
Source§impl PartialEq for DocumentFunction
impl PartialEq for DocumentFunction
Source§impl<'lua> ToLua<'lua> for &DocumentFunction
impl<'lua> ToLua<'lua> for &DocumentFunction
impl StructuralPartialEq for DocumentFunction
Auto Trait Implementations§
impl Freeze for DocumentFunction
impl RefUnwindSafe for DocumentFunction
impl Send for DocumentFunction
impl Sync for DocumentFunction
impl Unpin for DocumentFunction
impl UnwindSafe for DocumentFunction
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