[−][src]Enum binjs_shared::SharedString
An implementation of strings that may easily be shared without copies.
Static strings may be imported without copy, while dynamic strings
are converted into Rc
.
Variants
Static(&'static str)
Methods
impl SharedString
[src]
pub fn as_str(&self) -> &str
[src]
pub const fn from_str(value: &'static str) -> Self
[src]
pub fn from_rc_string(value: Rc<String>) -> Self
[src]
pub fn from_string(value: String) -> Self
[src]
Trait Implementations
impl Clone for SharedString
[src]
fn clone(&self) -> SharedString
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SharedString
[src]
impl Default for SharedString
[src]
impl Deref for SharedString
[src]
impl<'de> Deserialize<'de> for SharedString
[src]
Shared strings are deserialized as Dynamic strings.
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for SharedString
[src]
impl Eq for SharedString
[src]
impl Hash for SharedString
[src]
fn hash<H: Hasher>(&self, hasher: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for SharedString
[src]
fn cmp(&self, other: &SharedString) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> PartialEq<&'a str> for SharedString
[src]
impl PartialEq<SharedString> for SharedString
[src]
fn eq(&self, other: &SharedString) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<str> for SharedString
[src]
impl PartialOrd<SharedString> for SharedString
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for SharedString
[src]
Shared strings are serialized as strings. This loses any sharing :/
impl StructuralEq for SharedString
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SharedString
impl !Send for SharedString
impl !Sync for SharedString
impl Unpin for SharedString
impl UnwindSafe for SharedString
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,