Struct nsstring::nsCStr [] [src]

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

Methods

impl nsCStr<'static>
[src]

[src]

Methods from Deref<Target = nsACString>

[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]

[src]

Trait Implementations

impl<'a> PartialEq<nsCStr<'a>> for nsACString
[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 nsCStr<'a>
[src]

[src]

Executes the destructor for this type. Read more

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

The resulting type after dereferencing.

[src]

Dereferences the value.

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

[src]

Mutably dereferences the value.

impl<'a> AsRef<[u8]> for nsCStr<'a>
[src]

[src]

Performs the conversion.

impl<'a> From<&'a [u8]> for nsCStr<'a>
[src]

[src]

Performs the conversion.

impl<'a> From<&'a Vec<u8>> for nsCStr<'a>
[src]

[src]

Performs the conversion.

impl<'a> From<&'a nsACString> for nsCStr<'a>
[src]

[src]

Performs the conversion.

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

[src]

Formats the value using the given formatter. Read more

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

[src]

Formats the value using the given formatter. Read more

impl<'a> PartialEq for nsCStr<'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<[u8]> for nsCStr<'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 [u8]> for nsCStr<'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 nsCStr<'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 nsCStr<'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> nsCStringLike for nsCStr<'a>
[src]

[src]

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.