Struct NSMutableString

Source
#[repr(C)]
pub struct NSMutableString { pub ptr: Id<Object>, }
Expand description

A mutable string.

Fields§

§ptr: Id<Object>

The raw pointer to the Objective-C object.

Implementations§

Source§

impl NSMutableString

Source

pub fn string_with_capacity(capacity: UInt) -> NSMutableString

Returns an empty NSMutableString object with initial storage for a given number of characters.

§Arguments
  • capacity - The number of characters to allocate space for.
§Returns

An empty NSMutableString object with initial storage for a given number of characters.

Source

pub fn init_with_capacity(&mut self, capacity: UInt) -> NSMutableString
where Self: Sized,

Returns an NSMutableString object initialized with initial storage for a given number of characters,

§Arguments
  • capacity - The number of characters to allocate space for.
Source

pub fn append_string<S>(&mut self, string: S)
where S: INSString,

Adds a constructed string to the receiver.

§Arguments
  • string - The string to append to the receiver.
Source

pub fn apply_transform_reverse_range_updated_range( &mut self, transform: NSStringTransform, reverse: bool, range: NSRange, out_range: NSRange, ) -> bool

Transliterates the receiver by applying a specified ICU string transform.

§Arguments
  • transform - The StringTransform to apply.
  • reverse - If true, the transformation is applied in reverse.
  • range - The range of characters to apply the transformation to.
  • out_range - The range of characters that were transformed.
§Returns

true if the transformation was successful, otherwise false.

Source

pub fn delete_characters_in_range(&mut self, range: NSRange)

Removes from the receiver the characters in a given range.

§Arguments
  • range - The range of characters to remove.
Source

pub fn insert_string_at_index<S>(&mut self, string: S, loc: UInt)
where S: INSString,

Inserts into the receiver the characters of a given string at a given location.

§Arguments
  • string - The string to insert into the receiver.
  • loc - The location at which to insert string.
Source

pub fn replace_characters_in_range_with_string<S>( &mut self, range: NSRange, string: S, )
where S: INSString,

Replaces the characters from aRange with those in string.

§Arguments
  • range - The range of characters to replace.
  • string - The string to replace with.
Source

pub fn replace_occurrences_of_string_with_string_options_range<S>( &mut self, target: NSString, replacement: S, options: NSStringCompareOptions, search_range: NSRange, ) -> UInt
where S: INSString,

Replaces all occurrences of a given string in a given range with another given string, returning the number of replacements.

Source

pub fn set_string<S>(&mut self, string: S)
where S: INSString,

Replaces the characters of the receiver with those in a given string.

§Arguments
  • string - The string to replace the characters of the receiver with. string must not be null.

Methods from Deref<Target = Object>§

Source

pub fn class(&self) -> &Class

Returns the class of self.

Source

pub unsafe fn get_ivar<T>(&self, name: &str) -> &T
where T: Encode,

Returns a reference to the ivar of self with the given name. Panics if self has no ivar with the given name. Unsafe because the caller must ensure that the ivar is actually of type T.

Source

pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut T
where T: Encode,

Returns a mutable reference to the ivar of self with the given name. Panics if self has no ivar with the given name. Unsafe because the caller must ensure that the ivar is actually of type T.

Source

pub unsafe fn set_ivar<T>(&mut self, name: &str, value: T)
where T: Encode,

Sets the value of the ivar of self with the given name. Panics if self has no ivar with the given name. Unsafe because the caller must ensure that the ivar is actually of type T.

Trait Implementations§

Source§

impl Clone for NSMutableString

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NSMutableString

Source§

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

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

impl Default for NSMutableString

Source§

fn default() -> Self

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

impl Deref for NSMutableString

Source§

type Target = Object

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl DerefMut for NSMutableString

Source§

fn deref_mut(&mut self) -> &mut Object

Mutably dereferences the value.
Source§

impl Display for NSMutableString

Source§

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

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

impl Encode for NSMutableString

Source§

fn encode() -> Encoding

Returns the Objective-C type encoding for Self.
Source§

impl From<NSMutableString> for NSString

Source§

fn from(string: NSMutableString) -> Self

Converts to this type from the input type.
Source§

impl From<NSString> for NSMutableString

Source§

fn from(string: NSString) -> Self

Converts to this type from the input type.
Source§

impl FromId for NSMutableString

Source§

unsafe fn from_id(ptr: id) -> Self

Returns Self representation of the object. Read more
Source§

impl Hash for NSMutableString

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl INSMutableString for NSMutableString

Source§

fn m_string_with_capacity(capacity: UInt) -> NSMutableString

Returns an empty NSMutableString object with initial storage for a given number of characters. Read more
Source§

fn m_init_with_capacity(&mut self, capacity: UInt) -> NSMutableString
where Self: Sized,

Returns an NSMutableString object initialized with initial storage for a given number of characters, Read more
Source§

fn m_append_string<S>(&mut self, string: S)
where S: INSString,

Adds a constructed string to the receiver. Read more
Source§

fn m_apply_transform_reverse_range_updated_range( &mut self, transform: NSStringTransform, reverse: bool, range: NSRange, out_range: NSRange, ) -> bool

Transliterates the receiver by applying a specified ICU string transform. Read more
Source§

fn m_delete_characters_in_range(&mut self, range: NSRange)

Removes from the receiver the characters in a given range. Read more
Source§

fn m_insert_string_at_index<S>(&mut self, string: S, loc: UInt)
where S: INSString,

Inserts into the receiver the characters of a given string at a given location. Read more
Source§

fn m_replace_characters_in_range_with_string<S>( &mut self, range: NSRange, string: S, )
where S: INSString,

Replaces the characters from aRange with those in string. Read more
Source§

fn m_replace_occurrences_of_string_with_string_options_range<S>( &mut self, target: NSString, replacement: S, options: NSStringCompareOptions, search_range: NSRange, ) -> UInt
where S: INSString,

Replaces all occurrences of a given string in a given range with another given string, returning the number of replacements.
Source§

fn m_set_string<S>(&mut self, string: S)
where S: INSString,

Replaces the characters of the receiver with those in a given string. Read more
Source§

impl INSString for NSMutableString

Source§

fn m_string() -> Self
where Self: Sized + FromId,

Returns an empty string.
Source§

fn m_init(&mut self) -> Self
where Self: Sized + FromId,

Returns an initialized NSString object that contains no characters.
Source§

fn m_init_with_bytes_length_encoding( &mut self, bytes: *const c_void, len: UInt, encoding: Encoding, ) -> Self
where Self: Sized + FromId,

Returns an initialized NSString object containing a given number of bytes from a given buffer of bytes interpreted in a given encoding. Read more
Source§

fn m_init_with_bytes_no_copy_length_encoding_free_when_done( &mut self, bytes: *mut c_void, len: UInt, encoding: Encoding, free_buffer: bool, ) -> Self
where Self: Sized + FromId,

Returns an initialized NSString object that contains a given number of bytes from a given buffer of bytes interpreted in a given encoding, and optionally frees the buffer. Read more
Source§

fn m_init_with_characters_length( &mut self, characters: *const unichar, len: UInt, ) -> Self
where Self: Sized + FromId,

Returns an initialized NSString object that contains a given number of characters from a given C array of UTF-16 code units. Read more
Source§

fn m_init_with_characters_no_copy_length_free_when_done( &mut self, characters: unichar, length: UInt, free_buffer: bool, ) -> Self
where Self: Sized + FromId,

Returns an initialized NSString object that contains a given number of characters from a given C array of UTF-16 code units. Read more
Source§

fn m_init_with_string<S>(&mut self, s: S) -> Self
where Self: Sized + FromId, S: INSString,

Returns an NSString object initialized by copying the characters from another given string. Read more
Source§

fn m_init_with_cstring_encoding( &mut self, c_str: *const c_char, encoding: Encoding, ) -> Self
where Self: Sized + FromId,

Returns an NSString object initialized using the characters in a given C array, interpreted according to a given encoding. Read more
Source§

fn m_init_with_utf8_string(&mut self, c_str: *const c_char) -> Self
where Self: Sized + FromId,

Returns an NSString object initialized using the characters in a given C array, interpreted according to a UTF8 string. Read more
Source§

fn m_init_with_data_encoding( &mut self, data: NSData, encoding: Encoding, ) -> Self
where Self: Sized + FromId,

Returns an NSString object initialized by converting given data into UTF-16 code units using a given encoding. Read more
Source§

fn m_localized_user_notification_string_for_key_arguments<T>( key: NSString, arguments: NSArray<T>, ) -> NSString
where T: PNSObject,

Returns a localized string intended for display in a notification alert. Read more
Source§

fn m_string_with_characters_length( characters: *const unichar, length: UInt, ) -> Self
where Self: Sized + FromId,

Returns a string containing a given number of characters taken from a given C array of UTF-16 code units. Read more
Source§

fn m_string_with_string(s: NSString) -> Self
where Self: Sized + 'static + FromId,

Returns a string created by copying the characters from another given string. Read more
Source§

fn m_string_with_cstring_encoding( c_str: *const c_char, encoding: Encoding, ) -> Self
where Self: Sized + FromId,

Returns a string containing the bytes in a given C array, interpreted according to a given encoding. Read more
Source§

fn m_string_with_utf8_string(c_str: *const c_char) -> Self
where Self: Sized + FromId,

Returns a string created by copying the data from a given C array of UTF8-encoded bytes. Read more
Source§

fn m_string_with_contents_of_file_encoding( path: &NSString, enc: Encoding, ) -> Result<Self, NSError>
where Self: Sized + FromId,

Returns a string created by reading data from the file at a given path interpreted using a given encoding.
Source§

fn m_init_with_contents_of_file_encoding( &mut self, path: &NSString, enc: Encoding, ) -> Result<Self, NSError>
where Self: Sized + FromId,

Returns an NSString object initialized by reading data from the file at a given path using a given encoding.
Source§

fn m_string_with_contents_of_file_used_encoding( path: &NSString, enc: Encoding, ) -> Result<Self, NSError>
where Self: Sized + FromId,

Returns an NSString object initialized by reading data from the file at a given path using a given encoding.
Source§

fn m_init_with_contents_of_file_used_encoding( &mut self, path: &NSString, enc: Encoding, ) -> Result<Self, NSError>
where Self: Sized + FromId,

Returns a string created by reading data from the file at a given path and returns by reference the encoding used to interpret the file.
Source§

fn m_string_with_contents_of_url_encoding( path: &NSURL, enc: Encoding, ) -> Result<Self, NSError>
where Self: Sized + FromId,

Returns a string created by reading data from a given URL interpreted using a given encoding.
Source§

fn m_init_with_contents_of_url_encoding( &mut self, path: &NSURL, enc: Encoding, ) -> Result<Self, NSError>
where Self: Sized + FromId,

Returns an NSString object initialized by reading data from a given URL interpreted using a given encoding.
Source§

fn m_string_with_contents_of_url_used_encoding( path: &NSURL, enc: Encoding, ) -> Result<Self, NSError>
where Self: Sized + FromId,

Returns a string created by reading data from a given URL and returns by reference the encoding used to interpret the data.
Source§

fn m_init_with_contents_of_url_used_encoding( &mut self, path: &NSURL, enc: Encoding, ) -> Result<Self, NSError>
where Self: Sized + FromId,

Returns an NSString object initialized by reading data from a given URL and returns by reference the encoding used to interpret the data.
Source§

fn p_length(&self) -> UInt

The number of Unicode characters in this string.
Source§

fn m_length_of_bytes_using_encoding(&self, enc: Encoding) -> UInt

Returns the number of bytes required to store the receiver in a given encoding. Read more
Source§

fn m_maximum_length_of_bytes_using_encoding(&self, enc: Encoding) -> Int

Returns the maximum number of bytes needed to store the receiver in a given encoding. Read more
Source§

fn m_character_at_index(&self, index: UInt) -> char

Returns the character at a given UTF-16 code unit index. Read more
Source§

fn m_get_characters_range(&self, buffer: *mut unichar, range: NSRange)

Copies characters from a given range in the receiver into a given buffer. Read more
Source§

fn m_get_bytes_max_length_used_length_encoding_options_range_remaining_range( &self, buffer: *mut c_void, max_length: Int, used_length: *mut Int, encoding: Encoding, options: NSStringEncodingConversionOptions, range: NSRange, remaining_range: NSRange, ) -> bool

Gets a given range of characters as bytes in a specified encoding. Read more
Source§

fn m_c_string_using_encoding(&self, encoding: Encoding) -> *const c_char

Returns a representation of the string as a C string using a given encoding. Read more
Source§

fn m_get_cstring_max_length_encoding( &self, buffer: *mut c_char, max_length: UInt, encoding: Encoding, ) -> bool

Returns a representation of the string as a C string. Read more
Source§

fn p_utf8_string(&self) -> *const c_char

A null-terminated UTF8 representation of the string.
Source§

fn m_case_insensitive_compare<S>(&self, string: S) -> NSComparisonResult
where S: INSString,

Returns the result of invoking compare:options: with NSCaseInsensitiveSearch as the only option. Read more
Source§

fn m_localized_case_insensitive_compare<S>( &self, string: S, ) -> NSComparisonResult
where S: INSString,

Compares the string with a given string using a case-insensitive, localized, comparison. Read more
Source§

fn m_compare<S>(&self, string: S) -> NSComparisonResult
where S: INSString,

Returns the result of invoking compare:options:range: with no options and the receiver’s full extent as the range. Read more
Source§

fn m_localized_compare<S>(&self, string: S) -> NSComparisonResult
where S: INSString,

Returns the result of invoking compare:options:range: with no options and the receiver’s full extent as the range. Read more
Source§

fn m_compare_options<S>( &self, string: S, mask: NSStringCompareOptions, ) -> NSComparisonResult
where S: INSString,

Compares the string with the specified string using the given options. Read more
Source§

fn m_compare_options_range<S>( &self, string: S, mask: NSStringCompareOptions, range: NSRange, ) -> NSComparisonResult
where S: INSString,

Compares the string with the specified string using the given options. Read more
Source§

fn m_compare_options_range_locale<S>( &self, string: S, mask: NSStringCompareOptions, range: NSRange, locale: NSLocale, ) -> NSComparisonResult
where S: INSString,

Compares the string using the specified options and returns the lexical ordering for the range. Read more
Source§

fn m_localized_standard_compare<S>(&self, string: S) -> NSComparisonResult
where S: INSString,

Compares strings as sorted by the Finder. Read more
Source§

fn m_has_prefix<S>(&self, prefix: S) -> bool
where S: INSString,

Returns a Boolean value that indicates whether a given string matches the beginning characters of the receiver. Read more
Source§

fn m_has_suffix<S>(&self, suffix: S) -> bool
where S: INSString,

Returns a Boolean value that indicates whether a given string matches the ending characters of the receiver. Read more
Source§

fn m_is_equal_to_string<S>(&self, string: S) -> bool
where S: INSString,

Returns a Boolean value that indicates whether a given string is equal to the receiver using a literal Unicode-based comparison. Read more
Source§

fn m_string_by_appending_string<S>(&self, string: S) -> NSString
where S: INSString,

Returns a new string made by appending a given string to the receiver. Read more
Source§

fn m_string_by_padding_to_length_with_string_starting_at_index<S>( &self, new_length: UInt, pad_string: S, starting_at: UInt, ) -> NSString
where S: INSString,

Returns a new string formed from the receiver by either removing characters from the end, or by appending as many occurrences as necessary of a given pad string. Read more
Source§

fn p_lowercase_string(&self) -> NSString

A lowercase representation of the string.
Source§

fn p_localized_lowercase_string(&self) -> NSString

Returns a version of the string with all letters converted to lowercase, taking into account the current locale.
Source§

fn m_lowercase_string_with_locale(&self, locale: NSLocale) -> NSString

Returns a version of the string with all letters converted to lowercase, taking into account the specified locale. Read more
Source§

fn p_uppercase_string(&self) -> NSString

An uppercase representation of the string.
Source§

fn p_localized_uppercase_string(&self) -> NSString

Returns a version of the string with all letters converted to uppercase, taking into account the current locale.
Source§

fn m_uppercase_string_with_locale(&self, locale: NSLocale) -> NSString

Returns a version of the string with all letters converted to uppercase, taking into account the specified locale. Read more
Source§

fn p_capitalized_string(&self) -> NSString

A capitalized representation of the string.
Source§

fn p_localized_capitalized_string(&self) -> NSString

Returns a capitalized representation of the receiver using the current locale.
Source§

fn m_capitalized_string_with_locale(&self, locale: NSLocale) -> NSString

Returns a capitalized representation of the receiver using the specified locale.
Source§

fn m_components_separated_by_string<S>(&self, separator: S) -> NSArray<NSString>
where S: INSString,

Returns an array containing substrings from the receiver that have been divided by a given separator.
Source§

fn m_components_separated_by_characters_in_set( &self, separator: &NSCharacterSet, ) -> NSArray<NSString>

Returns an array containing substrings from the receiver that have been divided by characters in a given set.
Source§

fn m_string_by_trimming_characters_in_set( &self, set: &NSCharacterSet, ) -> NSString

Returns a new string made by removing from both ends of the receiver characters contained in a given character set.
Source§

fn m_substring_from_index(&self, from: UInt) -> NSString

Returns a new string containing the characters of the receiver from the one at a given index to the end.
Source§

fn m_substring_with_range(&self, range: NSRange) -> NSString

Returns a string object containing the characters of the receiver that lie within a given range.
Source§

fn m_substring_to_index(&self, to: UInt) -> NSString

Returns a new string containing the characters of the receiver up to, but not including, the one at a given index.
Source§

fn p_decomposed_string_with_canonical_mapping(&self) -> NSString

A string made by normalizing the string’s contents using the Unicode Normalization Form D.
Source§

fn p_decomposed_string_with_compatibility_mapping(&self) -> NSString

A string made by normalizing the receiver’s contents using the Unicode Normalization Form KD.
Source§

fn p_precomposed_string_with_canonical_mapping(&self) -> NSString

A string made by normalizing the string’s contents using the Unicode Normalization Form C.
Source§

fn p_precomposed_string_with_compatibility_mapping(&self) -> NSString

A string made by normalizing the receiver’s contents using the Unicode Normalization Form KC.
Source§

fn m_string_by_folding_with_options_locale( &mut self, options: NSStringCompareOptions, locale: &NSLocale, ) -> NSString

Creates a string suitable for comparison by removing the specified character distinctions from a string.
Source§

fn m_string_by_applying_transform_reverse( &mut self, transform: NSStringTransform, reverse: bool, ) -> Option<NSString>

Returns a new string made by appending to the receiver a given string. Read more
Source§

fn m_contains_string<S>(&self, other: S) -> bool
where S: INSString,

Returns a boolean value indicating whether the string contains a given string by performing a case-sensitive, locale-unaware search. Read more
Source§

fn p_available_string_encodings() -> *const Encoding

Returns a zero-terminated list of the encodings string objects support in the application’s environment.
Source§

fn p_default_cstring_encoding() -> Encoding

Returns the C-string encoding assumed for any method accepting a C string as an argument.
Source§

fn m_can_be_converted_to_encoding(&self, encoding: Encoding) -> bool

Returns a Boolean value that indicates whether the receiver can be converted to a given encoding without loss of information.
Source§

fn m_data_using_encoding(&self, encoding: Encoding) -> NSData

Returns an NSData object containing a representation of the receiver encoded using a given encoding.
Source§

impl PNSObject for NSMutableString

Source§

fn m_class<'a>() -> &'a Class

Returns the class object for the receiver’s class.
Source§

fn m_self(&self) -> id

Returns the receiver.
Source§

fn m_new() -> Self
where Self: Sized + FromId,

Allocates a new instance of the receiving class, sends it an init message, and returns the initialized object.
Source§

fn m_alloc() -> Self
where Self: Sized + FromId,

Returns a new instance of the receiving class.
Source§

fn m_initialize()

Initializes the class before it receives its first message.
Source§

fn ip_superclass<'a>() -> Option<&'a Class>

Returns the class object for the receiver’s superclass.
Source§

fn m_is_equal(&self, object: &Self) -> bool

Returns a Boolean value that indicates whether the receiver and a given object are equal.
Source§

fn p_hash(&self) -> UInt

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

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

Returns a Boolean value that indicates whether the receiver is an instance of given class or an instance of any class that inherits from that class.
Source§

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

Returns a Boolean value that indicates whether the receiver is an instance of a given class.
Source§

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

Returns a Boolean value that indicates whether the receiver implements or inherits a method that can respond to a specified message.
Source§

fn m_conforms_to_protocol(&self, protocol: Protocol) -> bool

Returns a Boolean value that indicates whether the receiver conforms to a given protocol.
Source§

fn p_description(&self) -> NSString

A textual representation of the receiver.
Source§

fn p_debug_description(&self) -> NSString

A textual representation of the receiver to use with a debugger.
Source§

fn m_perform_selector(&self, selector: Sel) -> id

Sends a specified message to the receiver and returns the result of the message.
Source§

fn m_perform_selector_with_object(&self, selector: Sel, with_object: id) -> id

Sends a message to the receiver with an object as the argument.
Source§

fn m_is_proxy(&self) -> bool

Returns a Boolean value that indicates whether the receiver does not descend from NSObject.
Source§

impl PartialEq<&str> for NSMutableString

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 NSMutableString

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 ToId for NSMutableString

Source§

fn to_id(self) -> id

Returns id representation of the object.

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.