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
fn adapt(&self) -> nsCStringAdapter
Implementations on Foreign Types
impl<'a, T: nsCStringLike + ?Sized> nsCStringLike for &'a T[src]
fn adapt(&self) -> nsCStringAdapter[src]
impl<'a, T: ?Sized> nsCStringLike for Cow<'a, T> where
T: nsCStringLike + ToOwned, [src]
T: nsCStringLike + ToOwned,
fn adapt(&self) -> nsCStringAdapter[src]
impl nsCStringLike for [u8][src]
fn adapt(&self) -> nsCStringAdapter[src]
impl nsCStringLike for Vec<u8>[src]
fn adapt(&self) -> nsCStringAdapter[src]
impl nsCStringLike for Box<[u8]>[src]
fn adapt(&self) -> nsCStringAdapter[src]
impl nsCStringLike for str[src]
fn adapt(&self) -> nsCStringAdapter[src]
impl nsCStringLike for String[src]
fn adapt(&self) -> nsCStringAdapter[src]
impl nsCStringLike for Box<str>[src]
fn adapt(&self) -> nsCStringAdapter[src]
Implementors
impl nsCStringLike for nsACStringimpl<'a> nsCStringLike for nsCStr<'a>impl nsCStringLike for nsCString