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§
Sourcefn m_init_with_string(string: &NSString) -> Self
fn m_init_with_string(string: &NSString) -> Self
Creates an attributed string with the characters of the specified string and no attribute information.
Sourcefn m_init_with_string_attributes(
string: &NSString,
attributes: &NSDictionary<NSAttributedStringKey, id>,
) -> Self
fn m_init_with_string_attributes( string: &NSString, attributes: &NSDictionary<NSAttributedStringKey, id>, ) -> Self
Creates an attributed string with the specified string and attributes.
Sourcefn m_init_with_attributed_string(attr_string: &NSAttributedString) -> Self
fn m_init_with_attributed_string(attr_string: &NSAttributedString) -> Self
Creates an attributed string with the characters and attributes of the specified attributed string.
Sourcefn m_init_with_data_options_document_attributes(
data: &NSData,
options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, id>,
document: &NSDictionary<NSAttributedStringDocumentAttributeKey, id>,
) -> Result<Self, NSError>
fn m_init_with_data_options_document_attributes( data: &NSData, options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, id>, document: &NSDictionary<NSAttributedStringDocumentAttributeKey, id>, ) -> Result<Self, NSError>
Creates an attributed string from the data in the specified data object.
Sourcefn m_attributes_at_index_effective_range(
&self,
location: UInt,
range: NSRangePointer,
) -> NSDictionary<NSAttributedStringKey, id>
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.
Sourcefn m_attributes_at_index_longest_effective_range_in_range(
&self,
location: UInt,
range: NSRangePointer,
range_limit: NSRange,
) -> NSDictionary<NSAttributedStringKey, id>
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.
Sourcefn m_is_equal_to_attributed_string(&self, other: &NSAttributedString) -> bool
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.
Sourcefn m_attributed_substring_from_range(
&self,
range: NSRange,
) -> NSAttributedString
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.