pub struct CloneString<V: AsRef<str>>(pub V);Expand description
A string type which is cloned to String to use as an attribute value.
This wrapepr type exists to draw attention to the fact that using a borrowed
string value requires cloning to a persistent string in the attribute state.
This also permits a more efficient implementation of &'static str, which
does not need this wrapper.
Tuple Fields§
§0: VTrait Implementations§
Source§impl<V: Clone + AsRef<str>> Clone for CloneString<V>
impl<V: Clone + AsRef<str>> Clone for CloneString<V>
Source§fn clone(&self) -> CloneString<V>
fn clone(&self) -> CloneString<V>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<V: Copy + AsRef<str>> Copy for CloneString<V>
impl<V: Eq + AsRef<str>> Eq for CloneString<V>
impl<V: PartialEq + AsRef<str>> StructuralPartialEq for CloneString<V>
Auto Trait Implementations§
impl<V> Freeze for CloneString<V>where
V: Freeze,
impl<V> RefUnwindSafe for CloneString<V>where
V: RefUnwindSafe,
impl<V> Send for CloneString<V>where
V: Send,
impl<V> Sync for CloneString<V>where
V: Sync,
impl<V> Unpin for CloneString<V>where
V: Unpin,
impl<V> UnsafeUnpin for CloneString<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for CloneString<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsAny for Twhere
T: Any,
impl<T> AsAny for Twhere
T: Any,
fn as_mut_dyn_any(&mut self) -> &mut (dyn Any + 'static)
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more