pub struct ToolSettingSpec {
pub key: &'static str,
pub label: &'static str,
pub description: &'static str,
pub section: &'static str,
pub advanced: bool,
pub kind: ToolSettingKind,
}Expand description
One user-facing setting exposed by a GameTool.
Fields§
§key: &'static str§label: &'static str§description: &'static str§section: &'static str§advanced: bool§kind: ToolSettingKindImplementations§
Source§impl ToolSettingSpec
impl ToolSettingSpec
pub fn bool( key: &'static str, label: &'static str, description: &'static str, ) -> Self
pub fn tri_state_bool( key: &'static str, label: &'static str, description: &'static str, ) -> Self
pub fn text( key: &'static str, label: &'static str, description: &'static str, ) -> Self
pub fn path( key: &'static str, label: &'static str, description: &'static str, ) -> Self
pub fn select( key: &'static str, label: &'static str, description: &'static str, options: &[&str], ) -> Self
pub fn labeled_select( key: &'static str, label: &'static str, description: &'static str, options: &[(&str, &str)], ) -> Self
pub fn number( key: &'static str, label: &'static str, description: &'static str, min: f64, max: f64, step: f64, ) -> Self
pub fn read_only( key: &'static str, label: &'static str, description: &'static str, ) -> Self
pub fn section(self, section: &'static str) -> Self
pub fn advanced(self) -> Self
Trait Implementations§
Source§impl Clone for ToolSettingSpec
impl Clone for ToolSettingSpec
Source§fn clone(&self) -> ToolSettingSpec
fn clone(&self) -> ToolSettingSpec
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 ToolSettingSpec
impl Debug for ToolSettingSpec
Source§impl PartialEq for ToolSettingSpec
impl PartialEq for ToolSettingSpec
Source§fn eq(&self, other: &ToolSettingSpec) -> bool
fn eq(&self, other: &ToolSettingSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ToolSettingSpec
Auto Trait Implementations§
impl Freeze for ToolSettingSpec
impl RefUnwindSafe for ToolSettingSpec
impl Send for ToolSettingSpec
impl Sync for ToolSettingSpec
impl Unpin for ToolSettingSpec
impl UnsafeUnpin for ToolSettingSpec
impl UnwindSafe for ToolSettingSpec
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