Trait nsstring::nsCStringLike [] [src]

pub trait nsCStringLike {
    fn adapt(&self) -> nsCStringAdapter;
}

This trait is implemented on types which are ns[C]String-like, in that they can at very low cost be converted to a borrowed &nsA[C]String. Unfortunately, the intermediate type ns[C]StringAdapter is required as well due to types like &[u8] needing to be (cheaply) wrapped in a nsCString on the stack to create the &nsACString.

This trait is used to DWIM when calling the methods on nsA[C]String.

Required Methods

Implementations on Foreign Types

impl<'a, T: nsCStringLike + ?Sized> nsCStringLike for &'a T
[src]

impl<'a, T: ?Sized> nsCStringLike for Cow<'a, T> where
    T: nsCStringLike + ToOwned
[src]

impl nsCStringLike for [u8]
[src]

impl nsCStringLike for Vec<u8>
[src]

impl nsCStringLike for Box<[u8]>
[src]

impl nsCStringLike for str
[src]

impl nsCStringLike for String
[src]

impl nsCStringLike for Box<str>
[src]

Implementors