Struct vscode_generator::snippets::snippets_doc::SnippetsDoc
source · pub struct SnippetsDoc {
pub language: String,
pub title: String,
pub description: String,
pub body: Vec<(String, String)>,
}
Expand description
The snippets documentation generator
- language - the snippets programming language name
- title - the snippets group name
- description - the snippets group description
- body - the documentation body, where ‘<(SNIPPET_PREFIX, SNIPPET_DESCRIPTION)>’
Fields§
§language: String
§title: String
§description: String
§body: Vec<(String, String)>
Implementations§
source§impl SnippetsDoc
impl SnippetsDoc
sourcepub fn new<S>(lang: S, title: S, descr: S) -> Self
pub fn new<S>(lang: S, title: S, descr: S) -> Self
Creates a new ‘SnippetsDoc’ object
- lang - the programming language name
- title - the snippets group name
- descr - the snippets group description
sourcepub fn clear_body(&mut self)
pub fn clear_body(&mut self)
Clears the documentation body contents
sourcepub fn write_line<S>(&mut self, prefix: S, descr: S)
pub fn write_line<S>(&mut self, prefix: S, descr: S)
Writing a new line to documentation body
- prefix - the snippet prefix text
- descr - the snippet description
no_run .write_line("st", "struct Name { ... }");
Trait Implementations§
source§impl Clone for SnippetsDoc
impl Clone for SnippetsDoc
source§fn clone(&self) -> SnippetsDoc
fn clone(&self) -> SnippetsDoc
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 SnippetsDoc
impl Debug for SnippetsDoc
Auto Trait Implementations§
impl Freeze for SnippetsDoc
impl RefUnwindSafe for SnippetsDoc
impl Send for SnippetsDoc
impl Sync for SnippetsDoc
impl Unpin for SnippetsDoc
impl UnwindSafe for SnippetsDoc
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)