pub struct IndicatorTemplateState {
pub templates: Vec<IndicatorTemplate>,
pub selected_template: Option<String>,
pub is_loading: bool,
pub show_save_form: bool,
pub save_name: String,
pub save_description: String,
pub pending_delete: Option<String>,
pub show_shared: bool,
}Expand description
State for the indicator template panel
Fields§
§templates: Vec<IndicatorTemplate>Available templates for the current indicator type
selected_template: Option<String>Currently selected template (for preview/actions)
is_loading: boolWhether the host is loading the template list.
show_save_form: boolWhether the save form is visible
save_name: StringName input for saving a new template
save_description: StringDescription input for saving a new template
pending_delete: Option<String>Template pending deletion (for confirmation)
Whether to show shared templates
Implementations§
Source§impl IndicatorTemplateState
impl IndicatorTemplateState
Sourcepub fn reset_save_form(&mut self)
pub fn reset_save_form(&mut self)
Reset the save form fields
Sourcepub fn cancel_delete(&mut self)
pub fn cancel_delete(&mut self)
Cancel pending deletion
Sourcepub fn set_templates(&mut self, templates: Vec<IndicatorTemplate>)
pub fn set_templates(&mut self, templates: Vec<IndicatorTemplate>)
Replace the template list supplied by the host and clear the loading state.
Trait Implementations§
Source§impl Clone for IndicatorTemplateState
impl Clone for IndicatorTemplateState
Source§fn clone(&self) -> IndicatorTemplateState
fn clone(&self) -> IndicatorTemplateState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 IndicatorTemplateState
impl Debug for IndicatorTemplateState
Source§impl Default for IndicatorTemplateState
impl Default for IndicatorTemplateState
Source§fn default() -> IndicatorTemplateState
fn default() -> IndicatorTemplateState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IndicatorTemplateState
impl RefUnwindSafe for IndicatorTemplateState
impl Send for IndicatorTemplateState
impl Sync for IndicatorTemplateState
impl Unpin for IndicatorTemplateState
impl UnsafeUnpin for IndicatorTemplateState
impl UnwindSafe for IndicatorTemplateState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more