#[repr(C)]pub struct NSMutableAttributedString { /* private fields */ }
NSAttributedString
only.Implementations§
source§impl NSMutableAttributedString
impl NSMutableAttributedString
pub fn from_nsstring(string: &NSString) -> Retained<Self>
NSString
only.pub fn from_attributed_nsstring( attributed_string: &NSAttributedString ) -> Retained<Self>
source§impl NSMutableAttributedString
impl NSMutableAttributedString
Methods declared on superclass NSAttributedString
NSExtendedAttributedString
pub fn initWithString(this: Allocated<Self>, str: &NSString) -> Retained<Self>
NSString
only.pub unsafe fn initWithString_attributes( this: Allocated<Self>, str: &NSString, attrs: Option<&NSDictionary<NSAttributedStringKey, AnyObject>> ) -> Retained<Self>
NSDictionary
and NSString
only.pub fn initWithAttributedString( this: Allocated<Self>, attr_str: &NSAttributedString ) -> Retained<Self>
source§impl NSMutableAttributedString
impl NSMutableAttributedString
pub unsafe fn replaceCharactersInRange_withString( &mut self, range: NSRange, str: &NSString )
NSRange
and NSString
only.pub unsafe fn setAttributes_range( &mut self, attrs: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>, range: NSRange )
NSDictionary
and NSRange
and NSString
only.source§impl NSMutableAttributedString
impl NSMutableAttributedString
Methods declared on superclass NSObject
source§impl NSMutableAttributedString
impl NSMutableAttributedString
NSExtendedMutableAttributedString
pub unsafe fn mutableString(&self) -> Retained<NSMutableString>
NSString
only.pub unsafe fn addAttribute_value_range( &mut self, name: &NSAttributedStringKey, value: &AnyObject, range: NSRange )
NSRange
and NSString
only.pub unsafe fn addAttributes_range( &mut self, attrs: &NSDictionary<NSAttributedStringKey, AnyObject>, range: NSRange )
NSDictionary
and NSRange
and NSString
only.pub unsafe fn removeAttribute_range( &mut self, name: &NSAttributedStringKey, range: NSRange )
NSRange
and NSString
only.pub unsafe fn replaceCharactersInRange_withAttributedString( &mut self, range: NSRange, attr_string: &NSAttributedString )
NSRange
only.pub unsafe fn insertAttributedString_atIndex( &mut self, attr_string: &NSAttributedString, loc: NSUInteger )
pub unsafe fn appendAttributedString( &mut self, attr_string: &NSAttributedString )
pub unsafe fn deleteCharactersInRange(&mut self, range: NSRange)
NSRange
only.pub fn setAttributedString(&mut self, attr_string: &NSAttributedString)
pub unsafe fn beginEditing(&mut self)
pub unsafe fn endEditing(&mut self)
source§impl NSMutableAttributedString
impl NSMutableAttributedString
Methods declared on superclass NSAttributedString
NSAttributedStringCreateFromMarkdown
pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( this: Allocated<Self>, markdown_file: &NSURL, options: Option<&NSAttributedStringMarkdownParsingOptions>, base_url: Option<&NSURL> ) -> Result<Retained<Self>, Retained<NSError>>
NSError
and NSURL
only.pub unsafe fn initWithMarkdown_options_baseURL_error( this: Allocated<Self>, markdown: &NSData, options: Option<&NSAttributedStringMarkdownParsingOptions>, base_url: Option<&NSURL> ) -> Result<Retained<Self>, Retained<NSError>>
NSData
and NSError
and NSURL
only.pub unsafe fn initWithMarkdownString_options_baseURL_error( this: Allocated<Self>, markdown_string: &NSString, options: Option<&NSAttributedStringMarkdownParsingOptions>, base_url: Option<&NSURL> ) -> Result<Retained<Self>, Retained<NSError>>
NSError
and NSString
and NSURL
only.impl NSMutableAttributedString
NSMutableAttributedStringFormatting
Methods from Deref<Target = NSAttributedString>§
pub fn string(&self) -> Retained<NSString>
NSString
only.pub unsafe fn attributesAtIndex_effectiveRange( &self, location: NSUInteger, range: NSRangePointer ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>
NSDictionary
and NSRange
and NSString
only.pub fn length(&self) -> NSUInteger
pub unsafe fn attribute_atIndex_effectiveRange( &self, attr_name: &NSAttributedStringKey, location: NSUInteger, range: NSRangePointer ) -> Option<Retained<AnyObject>>
NSRange
and NSString
only.pub unsafe fn attributedSubstringFromRange( &self, range: NSRange ) -> Retained<NSAttributedString>
NSRange
only.pub unsafe fn attributesAtIndex_longestEffectiveRange_inRange( &self, location: NSUInteger, range: NSRangePointer, range_limit: NSRange ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>
NSDictionary
and NSRange
and NSString
only.pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( &self, attr_name: &NSAttributedStringKey, location: NSUInteger, range: NSRangePointer, range_limit: NSRange ) -> Option<Retained<AnyObject>>
NSRange
and NSString
only.pub unsafe fn isEqualToAttributedString( &self, other: &NSAttributedString ) -> bool
pub unsafe fn enumerateAttributesInRange_options_usingBlock( &self, enumeration_range: NSRange, opts: NSAttributedStringEnumerationOptions, block: &Block<dyn Fn(NonNull<NSDictionary<NSAttributedStringKey, AnyObject>>, NSRange, NonNull<Bool>) + '_> )
NSDictionary
and NSRange
and NSString
and block2
only.pub unsafe fn enumerateAttribute_inRange_options_usingBlock( &self, attr_name: &NSAttributedStringKey, enumeration_range: NSRange, opts: NSAttributedStringEnumerationOptions, block: &Block<dyn Fn(*mut AnyObject, NSRange, NonNull<Bool>) + '_> )
NSRange
and NSString
and block2
only.pub unsafe fn attributedStringByInflectingString( &self ) -> Retained<NSAttributedString>
Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
Dynamically find the class of this object.
§Example
Check that an instance of NSObject
has the precise class NSObject
.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.Use Ivar::load
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.Use Ivar::load_mut
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
Trait Implementations§
source§impl AsMut<AnyObject> for NSMutableAttributedString
impl AsMut<AnyObject> for NSMutableAttributedString
source§impl AsMut<NSAttributedString> for NSMutableAttributedString
impl AsMut<NSAttributedString> for NSMutableAttributedString
source§fn as_mut(&mut self) -> &mut NSAttributedString
fn as_mut(&mut self) -> &mut NSAttributedString
source§impl AsMut<NSObject> for NSMutableAttributedString
impl AsMut<NSObject> for NSMutableAttributedString
source§impl AsRef<AnyObject> for NSMutableAttributedString
impl AsRef<AnyObject> for NSMutableAttributedString
source§impl AsRef<NSAttributedString> for NSMutableAttributedString
impl AsRef<NSAttributedString> for NSMutableAttributedString
source§fn as_ref(&self) -> &NSAttributedString
fn as_ref(&self) -> &NSAttributedString
source§impl AsRef<NSObject> for NSMutableAttributedString
impl AsRef<NSObject> for NSMutableAttributedString
source§impl Borrow<AnyObject> for NSMutableAttributedString
impl Borrow<AnyObject> for NSMutableAttributedString
source§impl Borrow<NSAttributedString> for NSMutableAttributedString
impl Borrow<NSAttributedString> for NSMutableAttributedString
source§fn borrow(&self) -> &NSAttributedString
fn borrow(&self) -> &NSAttributedString
source§impl Borrow<NSObject> for NSMutableAttributedString
impl Borrow<NSObject> for NSMutableAttributedString
source§impl BorrowMut<AnyObject> for NSMutableAttributedString
impl BorrowMut<AnyObject> for NSMutableAttributedString
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
source§impl BorrowMut<NSAttributedString> for NSMutableAttributedString
impl BorrowMut<NSAttributedString> for NSMutableAttributedString
source§fn borrow_mut(&mut self) -> &mut NSAttributedString
fn borrow_mut(&mut self) -> &mut NSAttributedString
source§impl BorrowMut<NSObject> for NSMutableAttributedString
impl BorrowMut<NSObject> for NSMutableAttributedString
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl ClassType for NSMutableAttributedString
impl ClassType for NSMutableAttributedString
§type Super = NSAttributedString
type Super = NSAttributedString
§type Mutability = MutableWithImmutableSuperclass<NSAttributedString>
type Mutability = MutableWithImmutableSuperclass<NSAttributedString>
source§const NAME: &'static str = "NSMutableAttributedString"
const NAME: &'static str = "NSMutableAttributedString"
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
source§impl Debug for NSMutableAttributedString
impl Debug for NSMutableAttributedString
source§impl Deref for NSMutableAttributedString
impl Deref for NSMutableAttributedString
source§impl DerefMut for NSMutableAttributedString
impl DerefMut for NSMutableAttributedString
source§impl Hash for NSMutableAttributedString
impl Hash for NSMutableAttributedString
source§impl NSCoding for NSMutableAttributedString
Available on crate feature NSObject
only.
impl NSCoding for NSMutableAttributedString
NSObject
only.source§impl NSCopying for NSMutableAttributedString
Available on crate feature NSObject
only.
impl NSCopying for NSMutableAttributedString
NSObject
only.source§impl NSMutableCopying for NSMutableAttributedString
Available on crate feature NSObject
only.
impl NSMutableCopying for NSMutableAttributedString
NSObject
only.source§impl NSObjectProtocol for NSMutableAttributedString
impl NSObjectProtocol for NSMutableAttributedString
source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
source§fn hash(&self) -> usize
fn hash(&self) -> usize
source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
source§impl NSSecureCoding for NSMutableAttributedString
Available on crate feature NSObject
only.
impl NSSecureCoding for NSMutableAttributedString
NSObject
only.source§impl PartialEq for NSMutableAttributedString
impl PartialEq for NSMutableAttributedString
source§fn eq(&self, other: &NSMutableAttributedString) -> bool
fn eq(&self, other: &NSMutableAttributedString) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSMutableAttributedString
impl RefEncode for NSMutableAttributedString
source§const ENCODING_REF: Encoding = <NSAttributedString as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSAttributedString as ::objc2::RefEncode>::ENCODING_REF
source§impl ToOwned for NSMutableAttributedString
Available on crate feature NSObject
only.
impl ToOwned for NSMutableAttributedString
NSObject
only.§type Owned = Retained<NSMutableAttributedString>
type Owned = Retained<NSMutableAttributedString>
source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
impl Eq for NSMutableAttributedString
impl Message for NSMutableAttributedString
impl StructuralPartialEq for NSMutableAttributedString
Auto Trait Implementations§
impl !Freeze for NSMutableAttributedString
impl RefUnwindSafe for NSMutableAttributedString
impl Send for NSMutableAttributedString
impl Sync for NSMutableAttributedString
impl !Unpin for NSMutableAttributedString
impl UnwindSafe for NSMutableAttributedString
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
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
Self
if the type has no
immutable counterpart. Read more§type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
Self
if the type has no
mutable counterpart. Read more