Struct tuna::Boolean [−][src]
pub struct Boolean { /* fields omitted */ }
Expand description
The definition of a boolean variable
Implementations
impl Boolean
[src]
impl Boolean
[src]pub const fn new(
category: &'static str,
name: &'static str,
default: bool
) -> Self
[src]
pub const fn new(
category: &'static str,
name: &'static str,
default: bool
) -> Self
[src]Define a new boolean variable that can be registered with tuna
pub fn register(&self)
[src]
pub fn register(&self)
[src]Explicitly register the boolean with tuna. This is not required, but it’ll reduce risk of stuttering when variables get registered.
pub fn read(&self) -> bool
[src]
pub fn read(&self) -> bool
[src]Read the variable from tuna. This will automatically call register on a lookup miss, and return the default value.
Trait Implementations
impl AsTuneable for Boolean
[src]
impl AsTuneable for Boolean
[src]impl Copy for Boolean
[src]
Auto Trait Implementations
impl RefUnwindSafe for Boolean
impl Send for Boolean
impl Sync for Boolean
impl Unpin for Boolean
impl UnwindSafe for Boolean
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more