pub struct OnionStaticObject { /* private fields */ }Implementations§
Source§impl OnionStaticObject
impl OnionStaticObject
pub fn new(obj: OnionObject) -> Self
pub fn weak(&self) -> &OnionObject
Sourcepub fn mutablize(self, gc: &mut GC<OnionObjectCell>) -> OnionStaticObject
pub fn mutablize(self, gc: &mut GC<OnionObjectCell>) -> OnionStaticObject
将值装箱成可变容器,严格遵循幂等律的情况下,Cell里不可能出现Mut对象。 也就是说,mut mut x和mut x是等价的。
Sourcepub fn immutablize(self) -> Result<OnionStaticObject, RuntimeError>
pub fn immutablize(self) -> Result<OnionStaticObject, RuntimeError>
将值从可变容器中卸载,严格遵循幂等律 也就是说,const const x和const x是等价的。
Trait Implementations§
Source§impl Clone for OnionStaticObject
impl Clone for OnionStaticObject
Source§fn clone(&self) -> OnionStaticObject
fn clone(&self) -> OnionStaticObject
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OnionStaticObject
impl Debug for OnionStaticObject
Source§impl Default for OnionStaticObject
impl Default for OnionStaticObject
Auto Trait Implementations§
impl Freeze for OnionStaticObject
impl !RefUnwindSafe for OnionStaticObject
impl Send for OnionStaticObject
impl Sync for OnionStaticObject
impl Unpin for OnionStaticObject
impl !UnwindSafe for OnionStaticObject
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