pub struct CFDateFormatter(/* private fields */);Implementations§
Source§impl CFDateFormatter
impl CFDateFormatter
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 CFDateFormatter
impl CFDateFormatter
Sourcepub fn new(
locale: Option<&CFLocale>,
date_style: CFDateFormatterStyle,
time_style: CFDateFormatterStyle,
) -> Self
pub fn new( locale: Option<&CFLocale>, date_style: CFDateFormatterStyle, time_style: CFDateFormatterStyle, ) -> Self
Create a date formatter for the given locale and styles.
Sourcepub fn format_date(&self, date: &CFDate) -> CFString
pub fn format_date(&self, date: &CFDate) -> CFString
Format a date into a localized string.
Trait Implementations§
Source§impl AsCFType for CFDateFormatter
impl AsCFType for CFDateFormatter
Source§impl Clone for CFDateFormatter
impl Clone for CFDateFormatter
Source§fn clone(&self) -> CFDateFormatter
fn clone(&self) -> CFDateFormatter
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 CFDateFormatter
impl Debug for CFDateFormatter
Source§impl Hash for CFDateFormatter
impl Hash for CFDateFormatter
Source§impl PartialEq for CFDateFormatter
impl PartialEq for CFDateFormatter
Source§fn eq(&self, other: &CFDateFormatter) -> bool
fn eq(&self, other: &CFDateFormatter) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CFDateFormatter
impl StructuralPartialEq for CFDateFormatter
Auto Trait Implementations§
impl Freeze for CFDateFormatter
impl RefUnwindSafe for CFDateFormatter
impl !Send for CFDateFormatter
impl !Sync for CFDateFormatter
impl Unpin for CFDateFormatter
impl UnsafeUnpin for CFDateFormatter
impl UnwindSafe for CFDateFormatter
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