[−][src]Struct swim_structure::item::Bool
Value
variant representing a boolean.
Examples
Convert a primitive bool
into a structurally typed Bool
value:
let value = Bool::from(true);
Extract a primitive bool
out of a structurally typed Bool
value:
let value = Bool::from(false); let primitive = value.to_bool();
Methods
impl Bool
[src]
pub const fn from_bool(value: bool) -> Bool
[src]
Constructs a new Bool
from a bool
value.
pub fn to_bool(&self) -> bool
[src]
Returns the bool
value of this Bool
reference.
pub fn as_value<'a>(&self) -> &Value<'a>
[src]
Upcasts this Bool
reference to a Value
reference.
pub fn as_mut_value<'a>(&mut self) -> &mut Value<'a>
[src]
Upcasts this Bool
reference to a mutable Value
reference.
pub fn into_value<'a>(self) -> Value<'a>
[src]
Upcasts this Bool
to a Value
.
pub fn into_item<'a>(self) -> Item<'a>
[src]
Upcasts this Bool
to an Item
.
Trait Implementations
impl PartialEq<Bool> for Bool
[src]
fn eq(&self, that: &Bool) -> bool
[src]
#[must_use]
default fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
default fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl Eq for Bool
[src]
impl<'a> From<Bool> for Item<'a>
[src]
impl<'a> From<Bool> for Value<'a>
[src]
impl From<bool> for Bool
[src]
impl From<Bool> for bool
[src]
impl Debug for Bool
[src]
impl Hash for Bool
[src]
fn hash<H: Hasher>(&self, hasher: &mut H)
[src]
default fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for Bool
[src]
fn clone(&self) -> Bool
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> AsMut<Value<'a>> for Bool
[src]
impl<'a> AsRef<Value<'a>> for Bool
[src]
impl Default for Bool
[src]
impl<'b> Stow<'b, Bool> for Bool
[src]
unsafe fn stow(
src: *mut Bool,
dst: *mut Bool,
_hold: &dyn Hold<'b>
) -> Result<(), HoldError>
[src]
src: *mut Bool,
dst: *mut Bool,
_hold: &dyn Hold<'b>
) -> Result<(), HoldError>
unsafe fn unstow(_src: *mut Bool, _dst: *mut Bool)
[src]
impl TryClone for Bool
[src]
impl<'a> CloneIntoHold<'a, Bool> for Bool
[src]
fn try_clone_into_hold(&self, _hold: &dyn Hold<'a>) -> Result<Bool, HoldError>
[src]
default fn clone_into_hold(&self, hold: &dyn Hold<'a>) -> T
[src]
Returns a clone of self
allocated in hold
. Read more
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<'b, S, T> StowFrom for T where
S: Stow<'b, T>,
[src]
S: Stow<'b, T>,
default fn try_stow_from(
src: S,
hold: &dyn Hold<'b>
) -> Result<T, (S, HoldError)>
[src]
src: S,
hold: &dyn Hold<'b>
) -> Result<T, (S, HoldError)>
default fn stow_from(value: T, hold: &dyn Hold<'b>) -> Self
[src]
impl<'b, S, T> StowInto for S where
T: StowFrom<'b, S>,
[src]
T: StowFrom<'b, S>,