RefCountedMut

Trait RefCountedMut 

Source
pub trait RefCountedMut<S: ?Sized + StringToFromBytes>: RefCounted<S> {
    // Required methods
    fn to_mut(&mut self) -> &mut S;
    fn as_mut(&mut self) -> &mut S;
}
Expand description

Trait for storage that can be reference counted and mutable

Required Methods§

Source

fn to_mut(&mut self) -> &mut S

Borrow the string as a mutable string reference, allocating and copying first, if needed.

Source

fn as_mut(&mut self) -> &mut S

Borrow the string as a mutable string reference. It will panic if the string is shared.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl RefCountedMut<str> for Rc<str>

Available on crate feature str only.
Source§

fn to_mut(&mut self) -> &mut str

Source§

fn as_mut(&mut self) -> &mut str

Source§

impl RefCountedMut<str> for Arc<str>

Available on crate feature str only.
Source§

fn to_mut(&mut self) -> &mut str

Source§

fn as_mut(&mut self) -> &mut str

Source§

impl RefCountedMut<CStr> for Rc<CStr>

Available on crate feature cstr only.
Source§

fn to_mut(&mut self) -> &mut CStr

Source§

fn as_mut(&mut self) -> &mut CStr

Source§

impl RefCountedMut<CStr> for Arc<CStr>

Available on crate feature cstr only.
Source§

fn to_mut(&mut self) -> &mut CStr

Source§

fn as_mut(&mut self) -> &mut CStr

Source§

impl RefCountedMut<OsStr> for Rc<OsStr>

Available on crate features std and osstr only.
Source§

fn to_mut(&mut self) -> &mut OsStr

Source§

fn as_mut(&mut self) -> &mut OsStr

Source§

impl RefCountedMut<OsStr> for Arc<OsStr>

Available on crate features std and osstr only.
Source§

fn to_mut(&mut self) -> &mut OsStr

Source§

fn as_mut(&mut self) -> &mut OsStr

Source§

impl RefCountedMut<Path> for Rc<Path>

Available on crate features std and path only.
Source§

fn to_mut(&mut self) -> &mut Path

Source§

fn as_mut(&mut self) -> &mut Path

Source§

impl RefCountedMut<Path> for Arc<Path>

Available on crate features std and path only.
Source§

fn to_mut(&mut self) -> &mut Path

Source§

fn as_mut(&mut self) -> &mut Path

Source§

impl RefCountedMut<[u8]> for Rc<[u8]>

Available on crate feature bytes only.
Source§

fn to_mut(&mut self) -> &mut [u8]

Source§

fn as_mut(&mut self) -> &mut [u8]

Source§

impl RefCountedMut<[u8]> for Arc<[u8]>

Available on crate feature bytes only.
Source§

fn to_mut(&mut self) -> &mut [u8]

Source§

fn as_mut(&mut self) -> &mut [u8]

Implementors§