pub struct GcString(/* private fields */);Implementations§
Source§impl GcString
impl GcString
pub fn as_ptr(&self) -> *mut str
pub fn as_ref<'gc>(&self, _token: &'gc impl GcToken) -> &'gc str
pub fn as_mut<'gc>(&mut self, _token: &'gc impl GcToken) -> &'gc mut str
Sourcepub unsafe fn as_ref_unconstrained(&self) -> &'static mut str
pub unsafe fn as_ref_unconstrained(&self) -> &'static mut str
§Safety
The returned reference cannot be used in a thread that is not registered with the GC.
Auto Trait Implementations§
impl !Send for GcString
impl !Sync for GcString
impl Freeze for GcString
impl RefUnwindSafe for GcString
impl Unpin for GcString
impl UnsafeUnpin for GcString
impl UnwindSafe for GcString
Blanket Implementations§
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