Struct nsstring::nsString [] [src]

#[repr(C)]
pub struct nsString { /* fields omitted */ }

Methods

impl nsString
[src]

[src]

Methods from Deref<Target = nsAString>

[src]

Assign the value of other into self, overwriting any value currently stored. Performs an optimized assignment when possible if other is a nsA[C]String.

[src]

Assign the value of other into self, overwriting any value currently stored. Performs an optimized assignment when possible if other is a nsA[C]String.

Returns Ok(()) on success, and Err(()) if the allocation failed.

[src]

Take the value of other and set self, overwriting any value currently stored. The passed-in string will be truncated.

[src]

Take the value of other and set self, overwriting any value currently stored. If this function fails, the source string will be left untouched, otherwise it will be truncated.

Returns Ok(()) on success, and Err(()) if the allocation failed.

[src]

Append the value of other into self.

[src]

Append the value of other into self.

Returns Ok(()) on success, and Err(()) if the allocation failed.

[src]

Set the length of the string to the passed-in length, and expand the backing capacity to match. This method is unsafe as it can expose uninitialized memory when len is greater than the current length of the string.

[src]

Set the length of the string to the passed-in length, and expand the backing capacity to match. This method is unsafe as it can expose uninitialized memory when len is greater than the current length of the string.

Returns Ok(()) on success, and Err(()) if the allocation failed.

[src]

[src]

Get a &mut reference to the backing data for this string. This method will allocate and copy if the current backing buffer is immutable or shared.

[src]

Get a &mut reference to the backing data for this string. This method will allocate and copy if the current backing buffer is immutable or shared.

Returns Ok(&mut [T]) on success, and Err(()) if the allocation failed.

[src]

[src]

[src]

[src]

Trait Implementations

impl PartialEq<nsString> for nsAString
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Drop for nsString
[src]

[src]

Executes the destructor for this type. Read more

impl Deref for nsString
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl DerefMut for nsString
[src]

[src]

Mutably dereferences the value.

impl AsRef<[u16]> for nsString
[src]

[src]

Performs the conversion.

impl<'a> From<&'a [u16]> for nsString
[src]

[src]

Performs the conversion.

impl<'a> From<&'a Vec<u16>> for nsString
[src]

[src]

Performs the conversion.

impl<'a> From<&'a nsAString> for nsString
[src]

[src]

Performs the conversion.

impl From<Box<[u16]>> for nsString
[src]

[src]

Performs the conversion.

impl From<Vec<u16>> for nsString
[src]

[src]

Performs the conversion.

impl Write for nsString
[src]

[src]

Writes a slice of bytes into this writer, returning whether the write succeeded. Read more

1.1.0
[src]

Writes a [char] into this writer, returning whether the write succeeded. Read more

1.0.0
[src]

Glue for usage of the [write!] macro with implementors of this trait. Read more

impl Display for nsString
[src]

[src]

Formats the value using the given formatter. Read more

impl Debug for nsString
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for nsString
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<[u16]> for nsString
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<&'a [u16]> for nsString
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq<str> for nsString
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a> PartialEq<&'a str> for nsString
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl nsStringLike for nsString
[src]

[src]

impl<'a> From<&'a str> for nsString
[src]

[src]

Performs the conversion.

impl<'a> From<&'a String> for nsString
[src]

[src]

Performs the conversion.