Skip to main content

Tag

Struct Tag 

Source
pub struct Tag {
    pub category: TagCategory,
    /* private fields */
}

Fields§

§category: TagCategory

Implementations§

Source§

impl Tag

Source

pub fn new(category: TagCategory, dtype: TagDType, val: TagValue) -> Self

Source

pub fn with_i64(category: TagCategory, val: i64) -> Self

Source

pub fn with_f64(category: TagCategory, val: f64) -> Self

Source

pub fn with_os_type(category: TagCategory, val: Type) -> Self

Source

pub fn with_flags(category: TagCategory, val: u64) -> Self

Source

pub fn with_cf_dictionary(dict: &Dictionary) -> Self

§Availability

macos_14_0, ios_17_0, tvos_17_0, watchos_10_0, visionos_1_0

Source

pub fn dtype(&self) -> TagDType

Source

pub fn val(&self) -> TagValue

Source

pub fn val_i64(&self) -> Option<i64>

Source

pub fn val_f64(&self) -> Option<f64>

Source

pub fn val_os_type(&self) -> Option<Type>

Source

pub fn val_flags(&self) -> Option<u64>

Source

pub fn set_val_i64(&mut self, val: i64)

Source

pub fn set_val_f64(&mut self, val: f64)

Source

pub fn set_val_os_type(&mut self, val: Type)

Source

pub fn set_val_flags(&mut self, val: u64)

Source

pub const fn is_valid(&self) -> bool

Source

pub const fn is_invalid(&self) -> bool

Source

pub fn desc_in(&self, allocator: Option<&Allocator>) -> Option<R<String>>

§Availability

macos_14_0, ios_17_0, tvos_17_0, watchos_10_0, visionos_1_0

Source

pub fn desc(&self) -> R<String>

§Availability

macos_14_0, ios_17_0, tvos_17_0, watchos_10_0, visionos_1_0

Source

pub fn to_cf_dictionary_in( &self, allocator: Option<&Allocator>, ) -> Option<R<DictionaryOf<String, Type>>>

§Availability

macos_14_0, ios_17_0, tvos_17_0, watchos_10_0, visionos_1_0

Source

pub fn to_cf_dictionary(&self) -> R<DictionaryOf<String, Type>>

§Availability

macos_14_0, ios_17_0, tvos_17_0, watchos_10_0, visionos_1_0

Trait Implementations§

Source§

impl Clone for Tag

Source§

fn clone(&self) -> Tag

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Tag

Source§

impl Debug for Tag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Tag

Source§

fn default() -> Tag

Returns the “default value” for a type. Read more
Source§

impl Eq for Tag

Source§

impl From<&Dictionary> for Tag

Available on iOS and crate feature ios_17_0, or macOS and crate feature macos_14_0, or tvOS and crate feature tvos_17_0, or visionOS and crate feature visionos_1_0, or watchOS and crate feature watchos_10_0 only.
Source§

fn from(value: &Dictionary) -> Self

Converts to this type from the input type.
Source§

impl From<&DictionaryOf<String, Type>> for Tag

Available on iOS and crate feature ios_17_0, or macOS and crate feature macos_14_0, or tvOS and crate feature tvos_17_0, or visionOS and crate feature visionos_1_0, or watchOS and crate feature watchos_10_0 only.
Source§

fn from(value: &DictionaryOf<String, Type>) -> Self

Converts to this type from the input type.
Source§

impl Hash for Tag

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Into<Retained<DictionaryOf<String, Type>>> for Tag

Available on iOS and crate feature ios_17_0, or macOS and crate feature macos_14_0, or tvOS and crate feature tvos_17_0, or visionOS and crate feature visionos_1_0, or watchOS and crate feature watchos_10_0 only.
Source§

fn into(self) -> R<DictionaryOf<String, Type>>

Converts this type into the (usually inferred) input type.
Source§

impl PartialEq for Tag

Source§

fn eq(&self, other: &Tag) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Tag

Auto Trait Implementations§

§

impl Freeze for Tag

§

impl RefUnwindSafe for Tag

§

impl Send for Tag

§

impl Sync for Tag

§

impl Unpin for Tag

§

impl UnsafeUnpin for Tag

§

impl UnwindSafe for Tag

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.