pub struct CFWriteStream(/* private fields */);Expand description
Safe wrapper around a retained Core Foundation CFWriteStream reference.
Implementations§
Source§impl CFWriteStream
impl CFWriteStream
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 CFWriteStream pointer and returns None for null.
§Safety
A non-null ptr must be a live CFWriteStream 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 CFWriteStream pointer and returns an owned wrapper.
§Safety
A non-null ptr must be a live CFWriteStream 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 CFWriteStream
impl AsCFType for CFWriteStream
Source§impl Clone for CFWriteStream
impl Clone for CFWriteStream
Source§fn clone(&self) -> CFWriteStream
fn clone(&self) -> CFWriteStream
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 CFWriteStream
impl Debug for CFWriteStream
impl Eq for CFWriteStream
Source§impl Hash for CFWriteStream
impl Hash for CFWriteStream
Source§impl PartialEq for CFWriteStream
impl PartialEq for CFWriteStream
impl StructuralPartialEq for CFWriteStream
Auto Trait Implementations§
impl !Send for CFWriteStream
impl !Sync for CFWriteStream
impl Freeze for CFWriteStream
impl RefUnwindSafe for CFWriteStream
impl Unpin for CFWriteStream
impl UnsafeUnpin for CFWriteStream
impl UnwindSafe for CFWriteStream
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