pub struct Bool;
Expand description
A scalar atom representing a boolean.
Internally, this atom is represented by a i32
, which is ==0
for false
and >= 1
for true
Trait Implementations§
Source§impl ScalarAtom for Bool
impl ScalarAtom for Bool
Source§type InternalType = i32
type InternalType = i32
The internal representation of the atom. Read more
Source§fn read_scalar(body: Space<'_>) -> Option<Self::InternalType>
fn read_scalar(body: Space<'_>) -> Option<Self::InternalType>
Try to read the atom from a space. Read more
Source§fn write_scalar<'a, 'b>(
frame: FramedMutSpace<'a, 'b>,
value: Self::InternalType,
) -> Option<&'a mut Self::InternalType>
fn write_scalar<'a, 'b>( frame: FramedMutSpace<'a, 'b>, value: Self::InternalType, ) -> Option<&'a mut Self::InternalType>
Try to write the atom into a space. Read more
Auto Trait Implementations§
impl Freeze for Bool
impl RefUnwindSafe for Bool
impl Send for Bool
impl Sync for Bool
impl Unpin for Bool
impl UnwindSafe for Bool
Blanket Implementations§
Source§impl<'a, 'b, A> Atom<'a, 'b> for Awhere
'a: 'b,
A: ScalarAtom,
impl<'a, 'b, A> Atom<'a, 'b> for Awhere
'a: 'b,
A: ScalarAtom,
Source§type ReadParameter = ()
type ReadParameter = ()
The atom-specific parameter of the
read
function. Read moreSource§type ReadHandle = <A as ScalarAtom>::InternalType
type ReadHandle = <A as ScalarAtom>::InternalType
The return value of the
read
function. Read moreSource§type WriteParameter = <A as ScalarAtom>::InternalType
type WriteParameter = <A as ScalarAtom>::InternalType
The atom-specific parameter of the
write
function. Read moreSource§type WriteHandle = &'a mut <A as ScalarAtom>::InternalType
type WriteHandle = &'a mut <A as ScalarAtom>::InternalType
The return value of the
write
function. Read moreSource§fn read(body: Space<'a>, _: ()) -> Option<<A as ScalarAtom>::InternalType>
fn read(body: Space<'a>, _: ()) -> Option<<A as ScalarAtom>::InternalType>
Read the body of the atom. Read more
Source§fn init(
frame: FramedMutSpace<'a, 'b>,
value: <A as ScalarAtom>::InternalType,
) -> Option<&'a mut <A as ScalarAtom>::InternalType>
fn init( frame: FramedMutSpace<'a, 'b>, value: <A as ScalarAtom>::InternalType, ) -> Option<&'a mut <A as ScalarAtom>::InternalType>
Initialize the body of the atom. Read more
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