pub struct NSAttributedString { /* private fields */ }Expand description
A string with associated attributes (such as visual style, hyperlinks, or accessibility data) for portions of its text.
Implementations§
Source§impl NSAttributedString
impl NSAttributedString
Sourcepub fn new(value: &str) -> NSAttributedString
pub fn new(value: &str) -> NSAttributedString
Creates an attributed string with the characters of the specified string and no attribute information.
Sourcepub fn with_attributes(
value: &str,
attributes: NSAttributes,
) -> NSAttributedString
pub fn with_attributes( value: &str, attributes: NSAttributes, ) -> NSAttributedString
Creates an attributed string with the specified string and attributes.
Sourcepub fn bounding_rect_with_size(&self, size: CGSize) -> CGRect
pub fn bounding_rect_with_size(&self, size: CGSize) -> CGRect
Returns the bounding rectangle necessary to draw the string.
Trait Implementations§
Source§impl Clone for NSAttributedString
impl Clone for NSAttributedString
Source§impl Drop for NSAttributedString
impl Drop for NSAttributedString
Source§impl Into<NSAttributedString> for NSMutableAttributedString
impl Into<NSAttributedString> for NSMutableAttributedString
Source§fn into(self) -> NSAttributedString
fn into(self) -> NSAttributedString
Converts this type into the (usually inferred) input type.
Source§impl Raw for NSAttributedString
impl Raw for NSAttributedString
impl Send for NSAttributedString
impl Sync for NSAttributedString
Auto Trait Implementations§
impl Freeze for NSAttributedString
impl RefUnwindSafe for NSAttributedString
impl Unpin for NSAttributedString
impl UnsafeUnpin for NSAttributedString
impl UnwindSafe for NSAttributedString
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