pub struct CFError(/* private fields */);Expand description
Safe wrapper around a retained Core Foundation CFError reference.
Implementations§
Source§impl CFError
impl CFError
Sourcepub fn from_raw(ptr: *mut c_void) -> Option<Self>
pub fn from_raw(ptr: *mut c_void) -> Option<Self>
Wraps a +1 retained CFError pointer and returns None for null.
Sourcepub unsafe fn from_raw_retained(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw_retained(ptr: *mut c_void) -> Option<Self>
Retains a +0 borrowed CFError pointer and wraps the resulting +1 reference.
§Safety
ptr must be NULL or a valid CFError pointer.
Sourcepub fn into_cf_type(self) -> CFType
pub fn into_cf_type(self) -> CFType
Consumes this wrapper and returns the erased CFType.
Source§impl CFError
impl CFError
Trait Implementations§
Source§impl Error for CFError
impl Error for CFError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl Eq for CFError
impl StructuralPartialEq for CFError
Auto Trait Implementations§
impl Freeze for CFError
impl RefUnwindSafe for CFError
impl !Send for CFError
impl !Sync for CFError
impl Unpin for CFError
impl UnsafeUnpin for CFError
impl UnwindSafe for CFError
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