#[repr(C)]pub struct ODSessionRef { /* private fields */ }
CFOpenDirectory
only.Expand description
Opaque reference for ODSession object
See also Apple’s documentation
Implementations§
Source§impl ODSessionRef
impl ODSessionRef
Sourcepub unsafe fn new(
allocator: Option<&CFAllocator>,
options: Option<&CFDictionary>,
error: *mut *mut CFError,
) -> Option<CFRetained<ODSessionRef>>
Available on crate features CFODSession
and objc2-core-foundation
only.
pub unsafe fn new( allocator: Option<&CFAllocator>, options: Option<&CFDictionary>, error: *mut *mut CFError, ) -> Option<CFRetained<ODSessionRef>>
CFODSession
and objc2-core-foundation
only.Creates an ODSession object to be passed to ODNode functions
Creates an ODSession object to be passed to ODNode functions.
Parameter allocator
: a memory allocator to use for this object
Parameter options
: a CFDictionary of options associated with this ODSession. This is typically NULL
unless caller needs to proxy to another host.
If proxy is required then a dictionary with keys should be: Key Value kODSessionProxyAddress CFString(hostname or IP) kODSessionProxyPort CFNumber(IP port, should not be set as it will default) kODSessionProxyUsername CFString(username) kODSessionProxyPassword CFString(password)
Parameter error
: an optional CFErrorRef reference for error details
Returns: a valid ODSessionRef object or NULL if it cannot be created. Pass reference to CFErrorRef to get error details
Sourcepub unsafe fn node_names(
allocator: Option<&CFAllocator>,
session: Option<&ODSessionRef>,
error: *mut *mut CFError,
) -> Option<CFRetained<CFArray>>
Available on crate features CFODSession
and objc2-core-foundation
only.
pub unsafe fn node_names( allocator: Option<&CFAllocator>, session: Option<&ODSessionRef>, error: *mut *mut CFError, ) -> Option<CFRetained<CFArray>>
CFODSession
and objc2-core-foundation
only.Returns the node names that are registered on this ODSession
Returns the node names that are registered on this ODSession
Parameter allocator
: a memory allocator to use for this object
Parameter session
: an ODSessionRef, either kODSessionDefault or a valid ODSessionRef can be passed
Parameter error
: an optional CFErrorRef reference for error details
Returns: a valid CFArrayRef of node names that can be opened on the session reference
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 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 ODSessionRef
impl AsRef<AnyObject> for ODSessionRef
Source§impl AsRef<CFType> for ODSessionRef
impl AsRef<CFType> for ODSessionRef
Source§impl AsRef<ODSessionRef> for ODSessionRef
impl AsRef<ODSessionRef> for ODSessionRef
Source§impl Borrow<AnyObject> for ODSessionRef
impl Borrow<AnyObject> for ODSessionRef
Source§impl Borrow<CFType> for ODSessionRef
impl Borrow<CFType> for ODSessionRef
Source§impl ConcreteType for ODSessionRef
Available on crate features CFODSession
and objc2-core-foundation
only.
impl ConcreteType for ODSessionRef
CFODSession
and objc2-core-foundation
only.Source§impl Debug for ODSessionRef
impl Debug for ODSessionRef
Source§impl Deref for ODSessionRef
impl Deref for ODSessionRef
Source§impl Hash for ODSessionRef
impl Hash for ODSessionRef
Source§impl Message for ODSessionRef
impl Message for ODSessionRef
Source§impl PartialEq for ODSessionRef
impl PartialEq for ODSessionRef
Source§impl RefEncode for ODSessionRef
impl RefEncode for ODSessionRef
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for ODSessionRef
impl Type for ODSessionRef
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