pub struct CFReadStream(/* private fields */);Expand description
Safe wrapper around a retained Core Foundation CFReadStream reference.
Implementations§
Source§impl CFReadStream
impl CFReadStream
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Adopts a +1 retained CFReadStream pointer and returns None for null.
§Safety
A non-null ptr must be a live CFReadStream pointer of the exact dynamic type carrying one retain transferred to this wrapper. The caller must not release or separately adopt that transferred retain.
Sourcepub unsafe fn from_raw_borrowed(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw_borrowed(ptr: *mut c_void) -> Option<Self>
Retains a +0 borrowed CFReadStream pointer and returns an owned wrapper.
§Safety
A non-null ptr must be a live CFReadStream pointer of the exact dynamic type for the duration of the retain call.
Sourcepub const fn as_ptr(&self) -> *mut c_void
pub const fn as_ptr(&self) -> *mut c_void
Borrows the raw +0 Core Foundation pointer while self remains alive.
Sourcepub fn into_cf_type(self) -> CFType
pub fn into_cf_type(self) -> CFType
Consumes this wrapper and returns the erased CFType.
Trait Implementations§
Source§impl AsCFType for CFReadStream
impl AsCFType for CFReadStream
Source§impl Clone for CFReadStream
impl Clone for CFReadStream
Source§fn clone(&self) -> CFReadStream
fn clone(&self) -> CFReadStream
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CFReadStream
impl Debug for CFReadStream
impl Eq for CFReadStream
Source§impl Hash for CFReadStream
impl Hash for CFReadStream
Source§impl PartialEq for CFReadStream
impl PartialEq for CFReadStream
impl StructuralPartialEq for CFReadStream
Auto Trait Implementations§
impl !Send for CFReadStream
impl !Sync for CFReadStream
impl Freeze for CFReadStream
impl RefUnwindSafe for CFReadStream
impl Unpin for CFReadStream
impl UnsafeUnpin for CFReadStream
impl UnwindSafe for CFReadStream
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