pub struct CFNetService { /* private fields */ }CFNetServices only.Expand description
Implementations§
Source§impl CFNetService
impl CFNetService
pub unsafe fn new( alloc: Option<&CFAllocator>, domain: &CFString, service_type: &CFString, name: &CFString, port: i32, ) -> CFRetained<CFNetService>
pub unsafe fn new_copy( alloc: Option<&CFAllocator>, service: &CFNetService, ) -> CFRetained<CFNetService>
pub unsafe fn domain(&self) -> CFRetained<CFString>
pub unsafe fn type(&self) -> CFRetained<CFString>
pub unsafe fn name(&self) -> CFRetained<CFString>
Sourcepub unsafe fn register_with_options(
&self,
options: CFOptionFlags,
error: *mut CFStreamError,
) -> bool
👎Deprecated: Use nw_browser_t or nw_listener_t in Network framework instead
pub unsafe fn register_with_options( &self, options: CFOptionFlags, error: *mut CFStreamError, ) -> bool
§Safety
error must be a valid pointer or null.
Sourcepub unsafe fn resolve_with_timeout(
&self,
timeout: CFTimeInterval,
error: *mut CFStreamError,
) -> bool
👎Deprecated: Use nw_browser_t or nw_listener_t in Network framework instead
pub unsafe fn resolve_with_timeout( &self, timeout: CFTimeInterval, error: *mut CFStreamError, ) -> bool
§Safety
error must be a valid pointer or null.
pub unsafe fn cancel(&self)
pub unsafe fn target_host(&self) -> Option<CFRetained<CFString>>
pub unsafe fn port_number(&self) -> i32
pub unsafe fn addressing(&self) -> Option<CFRetained<CFArray>>
pub unsafe fn txt_data(&self) -> Option<CFRetained<CFData>>
pub unsafe fn set_txt_data(&self, txt_record: &CFData) -> bool
pub unsafe fn new_dictionary_with_txt_data( alloc: Option<&CFAllocator>, txt_record: &CFData, ) -> Option<CFRetained<CFDictionary>>
Sourcepub unsafe fn new_txt_data_with_dictionary(
alloc: Option<&CFAllocator>,
key_value_pairs: &CFDictionary,
) -> Option<CFRetained<CFData>>
👎Deprecated: Use nw_browser_t or nw_listener_t in Network framework instead
pub unsafe fn new_txt_data_with_dictionary( alloc: Option<&CFAllocator>, key_value_pairs: &CFDictionary, ) -> Option<CFRetained<CFData>>
§Safety
key_value_pairs generics must be of the correct type.
Sourcepub unsafe fn set_client(
&self,
client_cb: CFNetServiceClientCallBack,
client_context: *mut CFNetServiceClientContext,
) -> bool
👎Deprecated: Use nw_browser_t or nw_listener_t in Network framework instead
pub unsafe fn set_client( &self, client_cb: CFNetServiceClientCallBack, client_context: *mut CFNetServiceClientContext, ) -> bool
§Safety
client_cbmust be implemented correctly.client_contextmust be a valid pointer or null.
Sourcepub unsafe fn schedule_with_run_loop(
&self,
run_loop: &CFRunLoop,
run_loop_mode: &CFString,
)
👎Deprecated: Use nw_browser_t or nw_listener_t in Network framework instead
pub unsafe fn schedule_with_run_loop( &self, run_loop: &CFRunLoop, run_loop_mode: &CFString, )
§Safety
run_loop possibly has additional threading requirements.
Sourcepub unsafe fn unschedule_from_run_loop(
&self,
run_loop: &CFRunLoop,
run_loop_mode: &CFString,
)
👎Deprecated: Use nw_browser_t or nw_listener_t in Network framework instead
pub unsafe fn unschedule_from_run_loop( &self, run_loop: &CFRunLoop, run_loop_mode: &CFString, )
§Safety
run_loop possibly has additional threading requirements.
Source§impl CFNetService
impl CFNetService
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
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 CFNumbers, small CFStrings 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 CFNetService
impl AsRef<AnyObject> for CFNetService
Source§impl AsRef<CFNetService> for CFNetService
impl AsRef<CFNetService> for CFNetService
Source§impl AsRef<CFType> for CFNetService
impl AsRef<CFType> for CFNetService
Source§impl Borrow<AnyObject> for CFNetService
impl Borrow<AnyObject> for CFNetService
Source§impl Borrow<CFType> for CFNetService
impl Borrow<CFType> for CFNetService
Source§impl ConcreteType for CFNetService
impl ConcreteType for CFNetService
Source§impl Debug for CFNetService
impl Debug for CFNetService
Source§impl Deref for CFNetService
impl Deref for CFNetService
Source§impl Hash for CFNetService
impl Hash for CFNetService
Source§impl Message for CFNetService
impl Message for CFNetService
Source§impl PartialEq for CFNetService
impl PartialEq for CFNetService
Source§impl RefEncode for CFNetService
impl RefEncode for CFNetService
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for CFNetService
impl Type for CFNetService
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
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,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
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,
core-foundation crate. Read more