pub struct CFMessagePort(/* private fields */);Implementations§
Source§impl CFMessagePort
impl CFMessagePort
pub fn from_raw(ptr: *mut c_void) -> Option<Self>
Sourcepub unsafe fn from_raw_retained(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw_retained(ptr: *mut c_void) -> Option<Self>
Retain a borrowed pointer before wrapping it.
§Safety
ptr must be NULL or a valid pointer of the expected Core Foundation type.
pub const fn as_ptr(&self) -> *mut c_void
pub fn type_id() -> usize
pub fn into_cf_type(self) -> CFType
Source§impl CFMessagePort
impl CFMessagePort
Sourcepub fn create_echo_local(name: &str) -> Self
pub fn create_echo_local(name: &str) -> Self
Create a local message port that echoes request data back as the reply.
Sourcepub fn connect_remote(name: &str) -> Option<Self>
pub fn connect_remote(name: &str) -> Option<Self>
Connect to an existing remote message port.
Sourcepub fn send_request(
&self,
bytes: &[u8],
timeout: Duration,
) -> Result<Vec<u8>, i32>
pub fn send_request( &self, bytes: &[u8], timeout: Duration, ) -> Result<Vec<u8>, i32>
Send a request and copy the reply bytes.
Sourcepub fn invalidate(&self)
pub fn invalidate(&self)
Invalidate the message port.
Trait Implementations§
Source§impl AsCFType for CFMessagePort
impl AsCFType for CFMessagePort
Source§impl Clone for CFMessagePort
impl Clone for CFMessagePort
Source§fn clone(&self) -> CFMessagePort
fn clone(&self) -> CFMessagePort
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 CFMessagePort
impl Debug for CFMessagePort
Source§impl Hash for CFMessagePort
impl Hash for CFMessagePort
Source§impl PartialEq for CFMessagePort
impl PartialEq for CFMessagePort
Source§fn eq(&self, other: &CFMessagePort) -> bool
fn eq(&self, other: &CFMessagePort) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CFMessagePort
impl StructuralPartialEq for CFMessagePort
Auto Trait Implementations§
impl Freeze for CFMessagePort
impl RefUnwindSafe for CFMessagePort
impl !Send for CFMessagePort
impl !Sync for CFMessagePort
impl Unpin for CFMessagePort
impl UnsafeUnpin for CFMessagePort
impl UnwindSafe for CFMessagePort
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