pub struct QuantumMemoryManager { /* private fields */ }
Expand description
Advanced memory manager for quantum state collections
Implementations§
Source§impl QuantumMemoryManager
impl QuantumMemoryManager
Sourcepub fn with_config(config: MemoryConfig) -> Self
pub fn with_config(config: MemoryConfig) -> Self
Create with custom configuration
Sourcepub fn add_state(
&mut self,
name: String,
state: EfficientStateVector,
) -> QuantRS2Result<()>
pub fn add_state( &mut self, name: String, state: EfficientStateVector, ) -> QuantRS2Result<()>
Add a state vector to be managed
Sourcepub fn remove_state(&mut self, name: &str) -> Option<EfficientStateVector>
pub fn remove_state(&mut self, name: &str) -> Option<EfficientStateVector>
Remove a state vector
Sourcepub fn get_state(&self, name: &str) -> Option<&EfficientStateVector>
pub fn get_state(&self, name: &str) -> Option<&EfficientStateVector>
Get a reference to a managed state
Sourcepub fn get_state_mut(&mut self, name: &str) -> Option<&mut EfficientStateVector>
pub fn get_state_mut(&mut self, name: &str) -> Option<&mut EfficientStateVector>
Get a mutable reference to a managed state
Sourcepub fn global_memory_stats(&self) -> GlobalMemoryStats
pub fn global_memory_stats(&self) -> GlobalMemoryStats
Get global memory statistics
Auto Trait Implementations§
impl Freeze for QuantumMemoryManager
impl RefUnwindSafe for QuantumMemoryManager
impl Send for QuantumMemoryManager
impl Sync for QuantumMemoryManager
impl Unpin for QuantumMemoryManager
impl UnwindSafe for QuantumMemoryManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more