Struct NSString

Source
#[repr(C)]
pub struct NSString<'data>(/* private fields */);
Expand description

A static, plain-text Unicode string object.

See documentation.

Implementations§

Source§

impl NSString<'_>

Getting available encodings.

Source

pub fn available_encodings_slice() -> &'static [NSStringEncoding]

Returns a slice containing all supported encodings.

The first time this is called, one pass is done to determine the length of the slice. The slice is then cached for subsequent calls.

Source

pub fn available_encodings_iter() -> impl Iterator<Item = NSStringEncoding>

Returns an iterator over all supported encodings.

Unlike available_encodings_slice, this is implemented lazily and does not perform caching.

Source

pub fn available_encodings_ptr() -> *const NSStringEncoding

Returns a pointer to a buffer containing all supported encodings.

See documentation.

Source

pub fn available_encodings_count() -> usize

Returns the number of supported encodings.

The first time this is called, one pass is done to determine the number of encodings. The count is then cached for subsequent calls. This shares the same cache as available_encodings_slice.

Source§

impl<'data> NSString<'data>

Source

pub fn from_str(s: &str) -> Arc<Self>

Creates an immutable string object from copying a slice.

Source

pub fn from_str_no_copy(s: &'data str) -> Arc<Self>

Creates an immutable string object without copying a slice.

§Safety

The returned string object or its clones must not outlive the referenced string slice.

Source

pub fn from_nsrange(range: NSRange) -> Arc<Self>

Returns a string representation of range.

See documentation.

Source

pub fn copy(&self) -> Arc<Self>

Returns a copy of this object using NSCopying.

See documentation.

Source

pub fn mutable_copy(&self) -> Arc<NSMutableString<'data>>

Returns a copy of this object using NSMutableCopying.

See documentation.

Source§

impl NSString<'_>

Getting contents as UTF-8.

Source

pub fn as_utf8_ptr(&self) -> *const c_char

Returns a null-terminated UTF-8 representation of self, or null if the internal storage of self does not allow this to be returned efficiently.

Unlike to_utf8_ptr, this does not allocate and construct a new UTF-8 C string if self does not represent one.

This is retrieved using CFStringGetCStringPtr and kCFStringEncodingUTF8.

Source

pub fn to_utf8_ptr(&self) -> *const c_char

Returns a null-terminated UTF-8 representation of self.

This C string is a pointer to a structure inside self, which may have a lifetime shorter than the string object and will certainly not have a longer lifetime. Therefore, you should copy the C string if it needs to be stored outside of the memory context in which you use this property.

This is retrieved using -[NSString UTF8String].

Source

pub fn utf8_length(&self) -> usize

Returns the number of bytes required to encode this string as UTF-8.

Source

pub unsafe fn as_str(&self) -> Option<&str>

Returns the contents of self as a native UTF-8 string slice, or None if the internal storage of self does not allow this to be returned efficiently.

Unlike to_str, this does not allocate and construct a new UTF-8 C string if self does not represent one.

§Safety

You must ensure that self is not mutated during the lifetime of the returned string slice.

Source

pub unsafe fn to_str(&self) -> &str

Returns the contents of self as a native UTF-8 string slice.

This internally uses to_utf8_ptr. See its documentation for details.

§Safety

The lifetime of the returned string slice may be shorter than this object. Therefore, long use cases should copy the bytes of the returned string slice or use to_string.

Source

pub unsafe fn as_str_with_nul(&self) -> Option<&str>

Returns the contents of self as a native UTF-8 string slice ending with a 0 byte, or None if the internal storage of self does not allow this to be returned efficiently.

Unlike to_str_with_nul, this does not allocate and construct a new UTF-8 C string if self does not represent one.

§Safety

You must ensure that self is not mutated during the lifetime of the returned string slice.

Source

pub unsafe fn to_str_with_nul(&self) -> &str

Returns the contents of self as a native UTF-8 string slice ending with a 0 byte.

This internally uses to_utf8_ptr. See its documentation for details.

§Safety

The lifetime of the returned string slice may be shorter than this object. Therefore, long use cases should copy the bytes of the returned string slice or use to_string_with_nul.

Source

pub fn to_string(&self) -> String

Returns the contents of self as a native UTF-8 string buffer.

This internally uses to_utf8_ptr. See its documentation for details.

§Performance Considerations

Because of how -[NSString UTF8String] works, this method will likely allocate twice as much memory needed for the length of the resulting buffer. If your use case is short-lived enough, consider using to_str to save memory and time.

Source

pub fn to_string_with_nul(&self) -> String

Returns the contents of self as a native UTF-8 string buffer ending with a 0 byte.

This internally uses to_utf8_ptr. See its documentation for details.

§Performance Considerations

Because of how -[NSString UTF8String] works, this method will likely allocate twice as much memory needed for the length of the resulting buffer. If your use case is short-lived enough, consider using to_str_with_nul to save memory and time.

Source§

impl NSString<'_>

Getting contents as UTF-16.

Source

pub fn as_utf16_ptr(&self) -> *const u16

Returns a pointer to the UTF-16 representation of self, or null if the internal storage of self does not allow this to be returned efficiently.

This is retrieved using CFStringGetCharactersPtr

See as_utf8_ptr for the UTF-8 equivalent.

Source

pub unsafe fn as_utf16(&self) -> Option<&[u16]>

Returns the contents of self as a UTF-16 string slice, or None if the internal storage of self does not allow this to be returned efficiently.

See as_str for the UTF-8 equivalent.

§Safety

You must ensure that self is not mutated during the lifetime of the returned slice.

Source§

impl NSString<'_>

Source

pub fn length(&self) -> NSUInteger

Returns the number of UTF-16 code units in self.

See documentation.

Source

pub fn length_of_bytes_using_encoding( &self, encoding: NSStringEncoding, ) -> NSUInteger

Returns the number of bytes required to store self in a given encoding.

The length does not include space for a terminating null character. Returns 0 if the specified encoding cannot be used to convert self or if the amount of memory required for storing the results of the encoding conversion would exceed NSIntegerMax.

The result is exact and is returned in O(n) time.

See documentation.

Source

pub fn to_selector(&self) -> Option<Sel>

Returns a selector with self as its name.

If self cannot be converted to UTF-8 (this should be only due to insufficient memory), this returns None.

See documentation.

Source

pub fn compare(&self, other: &NSString<'_>) -> NSComparisonResult

Compares the string and a given string using no options.

See documentation.

Source

pub fn localized_compare(&self, other: &NSString<'_>) -> NSComparisonResult

Compares the string and a given string using a localized comparison.

See documentation.

Source

pub fn case_insensitive_compare( &self, other: &NSString<'_>, ) -> NSComparisonResult

Compares the string with a given string using NSCaseInsensitiveSearch.

See documentation.

Source

pub fn localized_case_insensitive_compare( &self, other: &NSString<'_>, ) -> NSComparisonResult

Compares the string with a given string using a case-insensitive, localized, comparison.

See documentation.

Source

pub fn localized_standard_compare( &self, other: &NSString<'_>, ) -> NSComparisonResult

Compares strings as sorted by the Finder.

This method should be used whenever file names or other strings are presented in lists and tables where Finder-like sorting is appropriate. The exact sorting behavior of this method is different under different locales and may be changed in future releases. This method uses the current locale.

See documentation.

Source

pub fn has_prefix(&self, prefix: &NSString<'_>) -> bool

Returns true if the given string matches the beginning characters of self.

See documentation.

Source

pub fn has_suffix(&self, suffix: &NSString<'_>) -> bool

Returns true if the given string matches the ending characters of this string.

See documentation.

Methods from Deref<Target = NSObject<'data>>§

Source

pub fn retain_count(&self) -> usize

Returns this object’s reference count.

This method is only useful for debugging certain objects.

See documentation.

Source

pub fn responds_to_selector(&self, selector: Sel) -> bool

Returns true if this object implements or inherits a method that can respond to a specified message.

See documentation.

Source

pub fn is_kind_of_class(&self, class: &Class) -> bool

Returns true if this object is an instance or subclass of class.

See documentation

Source

pub fn is_member_of_class(&self, class: &Class) -> bool

Returns true if this object is an instance of class.

See documentation

Source

pub fn hash(&self) -> NSUInteger

Returns an integer that can be used as a table address in a hash table structure.

See documentation.

Source

pub fn copy(&self) -> Arc<Self>

Returns a copy of this object using NSCopying.

See documentation.

Source

pub fn mutable_copy(&self) -> Arc<Self>

Returns a copy of this object using NSMutableCopying.

See documentation.

Source

pub fn description(&self) -> Arc<NSString<'static>>

Returns a string that describes the contents of this object.

See documentation

Source

pub fn debug_description(&self) -> Arc<NSString<'static>>

Returns a string that describes the contents of the receiver for presentation in the debugger.

See documentation

Trait Implementations§

Source§

impl AsMut<NSErrorDomain> for NSString<'static>

Source§

fn as_mut(&mut self) -> &mut NSErrorDomain

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<NSErrorUserInfoKey> for NSString<'static>

Source§

fn as_mut(&mut self) -> &mut NSErrorUserInfoKey

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<NSExceptionName> for NSString<'static>

Source§

fn as_mut(&mut self) -> &mut NSExceptionName

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<'data> AsMut<NSString<'data>> for NSString<'data>

Source§

fn as_mut(&mut self) -> &mut Self

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<'data, T> AsMut<T> for NSString<'data>
where NSObject<'data>: AsMut<T>,

Source§

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

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<NSErrorDomain> for NSString<'static>

Source§

fn as_ref(&self) -> &NSErrorDomain

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<NSErrorUserInfoKey> for NSString<'static>

Source§

fn as_ref(&self) -> &NSErrorUserInfoKey

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<NSExceptionName> for NSString<'static>

Source§

fn as_ref(&self) -> &NSExceptionName

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'data> AsRef<NSString<'data>> for NSString<'data>

Source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'data, T> AsRef<T> for NSString<'data>
where NSObject<'data>: AsRef<T>,

Source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'data> ClassType<'data> for NSString<'data>

Source§

fn class() -> &'static Class

Returns the Objective-C class that can be used to instantiate a new instance of Self. Read more
Source§

impl Debug for NSString<'_>

Source§

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

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

impl Default for &NSString<'_>

Source§

fn default() -> Self

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

impl<'data> Deref for NSString<'data>

Source§

type Target = NSObject<'data>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Display for NSString<'_>

Source§

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

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

impl<'data> ObjectType<'data> for NSString<'data>

Source§

fn as_objc_object(&self) -> &ObjCObject<'data>

Casts self into a type-erased Objective-C object.
Source§

fn class<'s>(&'s self) -> &'s Class
where 'data: 's,

Returns the class that this object is an instance of.
Source§

impl<'data> ObjectType for NSString<'data>

Source§

fn retain(obj: &Self) -> Arc<Self>

Increments the object’s retain count and returns a smart pointer that automatically calls release on Drop. Read more
Source§

unsafe fn release(obj: NonNull<Self>)

Decrements the object’s retain count. Read more
Source§

impl Ord for NSString<'_>

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<&str> for NSString<'_>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSErrorDomain> for NSString<'static>
where NSString<'static>: PartialEq,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSErrorUserInfoKey> for NSString<'static>
where NSString<'static>: PartialEq,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSExceptionName> for NSString<'static>
where NSString<'static>: PartialEq,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSMutableString<'_>> for NSString<'_>

Source§

fn eq(&self, other: &NSMutableString<'_>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSString<'_>> for &str

Source§

fn eq(&self, other: &NSString<'_>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSString<'_>> for NSMutableString<'_>

Source§

fn eq(&self, other: &NSString<'_>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSString<'_>> for str

Source§

fn eq(&self, other: &NSString<'_>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSString<'static>> for NSErrorDomain
where NSString<'static>: PartialEq,

Source§

fn eq(&self, other: &NSString<'static>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSString<'static>> for NSErrorUserInfoKey
where NSString<'static>: PartialEq,

Source§

fn eq(&self, other: &NSString<'static>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<NSString<'static>> for NSExceptionName
where NSString<'static>: PartialEq,

Source§

fn eq(&self, other: &NSString<'static>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq<str> for NSString<'_>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialEq for NSString<'_>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialOrd<&str> for NSString<'_>

Source§

fn partial_cmp(&self, other: &&str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<NSMutableString<'_>> for NSString<'_>

Source§

fn partial_cmp(&self, other: &NSMutableString<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<NSString<'_>> for &str

Source§

fn partial_cmp(&self, other: &NSString<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<NSString<'_>> for NSMutableString<'_>

Source§

fn partial_cmp(&self, other: &NSString<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<NSString<'_>> for str

Source§

fn partial_cmp(&self, other: &NSString<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<str> for NSString<'_>

Source§

fn partial_cmp(&self, other: &str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd for NSString<'_>

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Eq for NSString<'_>

Auto Trait Implementations§

§

impl<'data> !Freeze for NSString<'data>

§

impl<'data> RefUnwindSafe for NSString<'data>

§

impl<'data> Send for NSString<'data>

§

impl<'data> Sync for NSString<'data>

§

impl<'data> Unpin for NSString<'data>

§

impl<'data> UnwindSafe for NSString<'data>

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<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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.