pub struct ComptimeCell<T: CubeType> { /* private fields */ }
Expand description
A cell that can store and mutate cube type types during comptime.
Implementations§
Source§impl<T: CubeType + Clone> ComptimeCell<T>
impl<T: CubeType + Clone> ComptimeCell<T>
pub fn new(value: T) -> Self
pub fn __expand_new( _scope: &mut Scope, value: T::ExpandType, ) -> ComptimeCellExpand<T>
pub fn read(&self) -> T
pub fn store(&mut self, value: T)
pub fn __expand_store( context: &mut Scope, this: ComptimeCellExpand<T>, value: T::ExpandType, )
pub fn __expand_read( scope: &mut Scope, this: ComptimeCellExpand<T>, ) -> T::ExpandType
Trait Implementations§
Source§impl<T: Clone + CubeType> Clone for ComptimeCell<T>
impl<T: Clone + CubeType> Clone for ComptimeCell<T>
Source§fn clone(&self) -> ComptimeCell<T>
fn clone(&self) -> ComptimeCell<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: CubeType> CubeType for ComptimeCell<T>
impl<T: CubeType> CubeType for ComptimeCell<T>
type ExpandType = ComptimeCellExpand<T>
Source§fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
Auto Trait Implementations§
impl<T> Freeze for ComptimeCell<T>
impl<T> !RefUnwindSafe for ComptimeCell<T>
impl<T> !Send for ComptimeCell<T>
impl<T> !Sync for ComptimeCell<T>
impl<T> Unpin for ComptimeCell<T>
impl<T> !UnwindSafe for ComptimeCell<T>
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