Struct nsstring::nsStr [] [src]

#[repr(C)]
pub struct nsStr<'a> { /* fields omitted */ }

Methods

impl nsStr<'static>
[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<'a> PartialEq<nsStr<'a>> 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<'a> Drop for nsStr<'a>
[src]

[src]

Executes the destructor for this type. Read more

impl<'a> Deref for nsStr<'a>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<'a> DerefMut for nsStr<'a>
[src]

[src]

Mutably dereferences the value.

impl<'a> AsRef<[u16]> for nsStr<'a>
[src]

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

impl<'a> Write for nsStr<'a>
[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<'a> Display for nsStr<'a>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> Debug for nsStr<'a>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> PartialEq for nsStr<'a>
[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<[u16]> for nsStr<'a>
[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, 'b> PartialEq<&'b [u16]> for nsStr<'a>
[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<str> for nsStr<'a>
[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, 'b> PartialEq<&'b str> for nsStr<'a>
[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> nsStringLike for nsStr<'a>
[src]

[src]