pub struct CFURL(/* private fields */);Expand description
Safe wrapper around a retained Core Foundation CFURL reference.
Implementations§
Source§impl CFURL
impl CFURL
Sourcepub fn from_raw(ptr: *mut c_void) -> Option<Self>
pub fn from_raw(ptr: *mut c_void) -> Option<Self>
Wraps a +1 retained CFURL pointer and returns None for null.
Sourcepub unsafe fn from_raw_retained(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw_retained(ptr: *mut c_void) -> Option<Self>
Retains a +0 borrowed CFURL pointer and wraps the resulting +1 reference.
§Safety
ptr must be NULL or a valid CFURL pointer.
Sourcepub fn into_cf_type(self) -> CFType
pub fn into_cf_type(self) -> CFType
Consumes this wrapper and returns the erased CFType.
Source§impl CFURL
impl CFURL
Sourcepub fn from_string(value: &str) -> Self
pub fn from_string(value: &str) -> Self
Create a URL from an absolute string.
Sourcepub fn from_file_system_path(path: &str, is_directory: bool) -> Self
pub fn from_file_system_path(path: &str, is_directory: bool) -> Self
Create a file URL from a POSIX path.
Sourcepub fn absolute_string(&self) -> CFString
pub fn absolute_string(&self) -> CFString
Absolute string form of the URL.
Sourcepub fn file_system_path(&self) -> CFString
pub fn file_system_path(&self) -> CFString
File-system path (POSIX style) for file URLs.
Sourcepub fn has_directory_path(&self) -> bool
pub fn has_directory_path(&self) -> bool
Whether the URL ends with a directory path separator.
Trait Implementations§
impl Eq for CFURL
impl StructuralPartialEq for CFURL
Auto Trait Implementations§
impl Freeze for CFURL
impl RefUnwindSafe for CFURL
impl !Send for CFURL
impl !Sync for CFURL
impl Unpin for CFURL
impl UnsafeUnpin for CFURL
impl UnwindSafe for CFURL
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