#[repr(C)]pub struct CFReadStream { /* private fields */ }
Available on crate feature
CFStream
only.Expand description
Implementations§
Source§impl CFReadStream
impl CFReadStream
pub unsafe fn with_bytes_no_copy( alloc: Option<&CFAllocator>, bytes: *const u8, length: CFIndex, bytes_deallocator: Option<&CFAllocator>, ) -> Option<CFRetained<CFReadStream>>
Source§impl CFReadStream
impl CFReadStream
pub fn with_file( alloc: Option<&CFAllocator>, file_url: Option<&CFURL>, ) -> Option<CFRetained<CFReadStream>>
Available on crate feature
CFURL
only.Source§impl CFReadStream
impl CFReadStream
pub fn status(self: &CFReadStream) -> CFStreamStatus
Source§impl CFReadStream
impl CFReadStream
pub fn copy_error(self: &CFReadStream) -> Option<CFRetained<CFError>>
Available on crate feature
CFError
only.Source§impl CFReadStream
impl CFReadStream
pub fn open(self: &CFReadStream) -> bool
Source§impl CFReadStream
impl CFReadStream
pub fn close(self: &CFReadStream)
Source§impl CFReadStream
impl CFReadStream
pub fn has_bytes_available(self: &CFReadStream) -> bool
pub unsafe fn read( self: &CFReadStream, buffer: *mut u8, buffer_length: CFIndex, ) -> CFIndex
pub unsafe fn buffer( self: &CFReadStream, max_bytes_to_read: CFIndex, num_bytes_read: *mut CFIndex, ) -> *const u8
Source§impl CFReadStream
impl CFReadStream
pub fn property( self: &CFReadStream, property_name: Option<&CFStreamPropertyKey>, ) -> Option<CFRetained<CFType>>
Source§impl CFReadStream
impl CFReadStream
pub unsafe fn set_property( self: &CFReadStream, property_name: Option<&CFStreamPropertyKey>, property_value: Option<&CFType>, ) -> bool
Source§impl CFReadStream
impl CFReadStream
pub unsafe fn set_client( self: &CFReadStream, stream_events: CFOptionFlags, client_cb: CFReadStreamClientCallBack, client_context: *mut CFStreamClientContext, ) -> bool
Source§impl CFReadStream
impl CFReadStream
pub fn schedule_with_run_loop( self: &CFReadStream, run_loop: Option<&CFRunLoop>, run_loop_mode: Option<&CFRunLoopMode>, )
Available on crate feature
CFRunLoop
only.Source§impl CFReadStream
impl CFReadStream
pub fn unschedule_from_run_loop( self: &CFReadStream, run_loop: Option<&CFRunLoop>, run_loop_mode: Option<&CFRunLoopMode>, )
Available on crate feature
CFRunLoop
only.Source§impl CFReadStream
impl CFReadStream
pub unsafe fn set_dispatch_queue(self: &CFReadStream, q: Option<&DispatchQueue>)
Available on crate feature
dispatch2
only.Source§impl CFReadStream
impl CFReadStream
pub unsafe fn dispatch_queue( self: &CFReadStream, ) -> Option<DispatchRetained<DispatchQueue>>
Available on crate feature
dispatch2
only.Source§impl CFReadStream
impl CFReadStream
pub fn error(self: &CFReadStream) -> CFStreamError
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T: ConcreteType>(&self) -> Option<&T>
pub fn downcast_ref<T: ConcreteType>(&self) -> Option<&T>
Attempt to downcast the type to that of type T
.
This is the reference-variant. Use CFRetained::downcast
if you
want to convert a retained type. See also ConcreteType
for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumber
s, small CFString
s etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX
in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for CFReadStream
impl AsRef<AnyObject> for CFReadStream
Source§impl AsRef<CFReadStream> for CFReadStream
impl AsRef<CFReadStream> for CFReadStream
Source§impl AsRef<CFType> for CFReadStream
impl AsRef<CFType> for CFReadStream
Source§impl Borrow<AnyObject> for CFReadStream
impl Borrow<AnyObject> for CFReadStream
Source§impl Borrow<CFType> for CFReadStream
impl Borrow<CFType> for CFReadStream
Source§impl ConcreteType for CFReadStream
impl ConcreteType for CFReadStream
Source§impl Debug for CFReadStream
impl Debug for CFReadStream
Source§impl Deref for CFReadStream
impl Deref for CFReadStream
Source§impl Hash for CFReadStream
impl Hash for CFReadStream
Source§impl Message for CFReadStream
impl Message for CFReadStream
Source§impl PartialEq for CFReadStream
impl PartialEq for CFReadStream
Source§impl RefEncode for CFReadStream
impl RefEncode for CFReadStream
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
Source§impl Type for CFReadStream
impl Type for CFReadStream
Source§fn retain(&self) -> CFRetained<Self> ⓘwhere
Self: Sized,
fn retain(&self) -> CFRetained<Self> ⓘwhere
Self: Sized,
Increment the reference count of the receiver. Read more
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
👎Deprecated: this is redundant
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
👎Deprecated: use CFRetained::retain
Helper for easier transition from the
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
👎Deprecated: this is redundant (CF types deref to CFType)
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self> ⓘwhere
Self: Sized,
👎Deprecated: use CFRetained::from_raw
Helper for easier transition from the
core-foundation
crate. Read moreimpl Eq for CFReadStream
Auto Trait Implementations§
impl !Freeze for CFReadStream
impl !RefUnwindSafe for CFReadStream
impl !Send for CFReadStream
impl !Sync for CFReadStream
impl !Unpin 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