#[repr(transparent)]pub struct Bool { /* private fields */ }
Expand description
The Objective-C BOOL
type.
This is a thin wrapper-type over objc_sys::BOOL
. It is intended that
you convert this into a Rust bool
with the Bool::as_bool
method as
soon as possible.
This is FFI-safe and can be used directly with msg_send!
and extern
functions.
Note that this is able to contain more states than bool
on some
platforms, but these cases should not be relied on!
Implementations§
source§impl Bool
impl Bool
sourcepub const fn from_raw(value: BOOL) -> Self
pub const fn from_raw(value: BOOL) -> Self
Creates this from a boolean value received from a raw Objective-C API.
sourcepub const fn as_raw(self) -> BOOL
pub const fn as_raw(self) -> BOOL
Retrieves the inner ffi::BOOL
boolean type, to be used in raw
Objective-C APIs.
Trait Implementations§
source§impl RefEncode for Bool
impl RefEncode for Bool
source§const ENCODING_REF: Encoding = _
const ENCODING_REF: Encoding = _
The Objective-C type-encoding for a reference of this type. Read more
impl Copy for Bool
Auto Trait Implementations§
impl RefUnwindSafe for Bool
impl Send for Bool
impl Sync for Bool
impl Unpin for Bool
impl UnwindSafe for Bool
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
source§impl<T> EncodeConvertArgument for Twhere
T: Encode,
impl<T> EncodeConvertArgument for Twhere T: Encode,
type __Inner = T
type __StoredBeforeMessage = ()
fn __from_declared_param(inner: <T as EncodeConvertArgument>::__Inner) -> T
fn __into_argument( self ) -> (<T as EncodeConvertArgument>::__Inner, <T as EncodeConvertArgument>::__StoredBeforeMessage)
source§impl<T> EncodeConvertReturn for Twhere
T: EncodeReturn,
impl<T> EncodeConvertReturn for Twhere T: EncodeReturn,
type __Inner = T
fn __into_declared_return(self) -> <T as EncodeConvertReturn>::__Inner
fn __from_return(inner: <T as EncodeConvertReturn>::__Inner) -> T
source§impl<T> EncodeReturn for Twhere
T: Encode,
impl<T> EncodeReturn for Twhere T: Encode,
source§const ENCODING_RETURN: Encoding = const ENCODING_RETURN: Encoding = T::ENCODING;
const ENCODING_RETURN: Encoding = const ENCODING_RETURN: Encoding = T::ENCODING;
Available on crate feature
unstable-encode-internals
only.The Objective-C type-encoding for this type.