Trait nsstring::nsStringLike
[−]
[src]
pub trait nsStringLike { fn adapt(&self) -> nsStringAdapter; }
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) -> nsStringAdapter
Implementations on Foreign Types
impl<'a, T: nsStringLike + ?Sized> nsStringLike for &'a T
[src]
fn adapt(&self) -> nsStringAdapter
[src]
impl<'a, T: ?Sized> nsStringLike for Cow<'a, T> where
T: nsStringLike + ToOwned,
[src]
T: nsStringLike + ToOwned,