Trait INSAttributedString

Source
pub trait INSAttributedString: PNSObject {
    // Provided methods
    fn m_init_with_string(string: &NSString) -> Self
       where Self: Sized + FromId { ... }
    fn m_init_with_string_attributes(
        string: &NSString,
        attributes: &NSDictionary<NSAttributedStringKey, id>,
    ) -> Self
       where Self: Sized + FromId { ... }
    fn m_init_with_attributed_string(attr_string: &NSAttributedString) -> Self
       where Self: Sized + FromId { ... }
    fn m_init_with_data_options_document_attributes(
        data: &NSData,
        options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, id>,
        document: &NSDictionary<NSAttributedStringDocumentAttributeKey, id>,
    ) -> Result<Self, NSError>
       where Self: Sized + FromId { ... }
    fn p_string(&self) -> NSString { ... }
    fn p_length(&self) -> UInt { ... }
    fn m_attributes_at_index_effective_range(
        &self,
        location: UInt,
        range: NSRangePointer,
    ) -> NSDictionary<NSAttributedStringKey, id> { ... }
    fn m_attributes_at_index_longest_effective_range_in_range(
        &self,
        location: UInt,
        range: NSRangePointer,
        range_limit: NSRange,
    ) -> NSDictionary<NSAttributedStringKey, id> { ... }
    fn m_is_equal_to_attributed_string(
        &self,
        other: &NSAttributedString,
    ) -> bool { ... }
    fn m_attributed_substring_from_range(
        &self,
        range: NSRange,
    ) -> NSAttributedString { ... }
}
Expand description

A trait containing all the methods for NSAttributedString

Provided Methods§

Source

fn m_init_with_string(string: &NSString) -> Self
where Self: Sized + FromId,

Creates an attributed string with the characters of the specified string and no attribute information.

Source

fn m_init_with_string_attributes( string: &NSString, attributes: &NSDictionary<NSAttributedStringKey, id>, ) -> Self
where Self: Sized + FromId,

Creates an attributed string with the specified string and attributes.

Source

fn m_init_with_attributed_string(attr_string: &NSAttributedString) -> Self
where Self: Sized + FromId,

Creates an attributed string with the characters and attributes of the specified attributed string.

Source

fn m_init_with_data_options_document_attributes( data: &NSData, options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, id>, document: &NSDictionary<NSAttributedStringDocumentAttributeKey, id>, ) -> Result<Self, NSError>
where Self: Sized + FromId,

Creates an attributed string from the data in the specified data object.

Source

fn p_string(&self) -> NSString

The character contents of the attributed string as a string.

Source

fn p_length(&self) -> UInt

The length of the attributed string.

Source

fn m_attributes_at_index_effective_range( &self, location: UInt, range: NSRangePointer, ) -> NSDictionary<NSAttributedStringKey, id>

Returns the attributes for the character at the specified index.

Source

fn m_attributes_at_index_longest_effective_range_in_range( &self, location: UInt, range: NSRangePointer, range_limit: NSRange, ) -> NSDictionary<NSAttributedStringKey, id>

Returns the attributes for the character at the specified index and, by reference, the range where the attributes apply.

Source

fn m_is_equal_to_attributed_string(&self, other: &NSAttributedString) -> bool

Returns a Boolean value that indicates whether the attributed string is equal to another attributed string.

Source

fn m_attributed_substring_from_range( &self, range: NSRange, ) -> NSAttributedString

Returns an attributed string consisting of the characters and attributes within the specified range in the attributed string.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§