pub struct TemplateSet {
pub templates: Vec<ResolvedTemplate>,
pub missing: Vec<TemplateFile>,
}Expand description
Result of discovering templates in a workspace.
Fields§
§templates: Vec<ResolvedTemplate>§missing: Vec<TemplateFile>Implementations§
Source§impl TemplateSet
impl TemplateSet
Sourcepub fn get(&self, template: TemplateFile) -> Option<&ResolvedTemplate>
pub fn get(&self, template: TemplateFile) -> Option<&ResolvedTemplate>
Get the content for a specific template, if loaded.
Sourcepub fn main_session_templates(&self) -> Vec<&ResolvedTemplate>
pub fn main_session_templates(&self) -> Vec<&ResolvedTemplate>
Get all templates appropriate for the main session.
Get only templates appropriate for shared sessions.
Sourcepub fn missing_guidance(&self) -> Option<String>
pub fn missing_guidance(&self) -> Option<String>
Format a guidance message for missing templates.
Trait Implementations§
Source§impl Clone for TemplateSet
impl Clone for TemplateSet
Source§fn clone(&self) -> TemplateSet
fn clone(&self) -> TemplateSet
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 moreAuto Trait Implementations§
impl Freeze for TemplateSet
impl RefUnwindSafe for TemplateSet
impl Send for TemplateSet
impl Sync for TemplateSet
impl Unpin for TemplateSet
impl UnsafeUnpin for TemplateSet
impl UnwindSafe for TemplateSet
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