pub struct PhysicsDataStorage { /* private fields */ }Expand description
Physics data storage
Implementations§
Source§impl PhysicsDataStorage
impl PhysicsDataStorage
pub fn new() -> Self
Sourcepub fn register_backend(&mut self, name: &str, backend: StorageBackend)
pub fn register_backend(&mut self, name: &str, backend: StorageBackend)
Register a storage backend under the given name.
Sourcepub fn initialize(&mut self) -> Result<(), PhysicsError>
pub fn initialize(&mut self) -> Result<(), PhysicsError>
Initialize default ZNS and CSD backends.
In environments where ZnsZoneManager and CsdManager hardware is not
accessible, the backends are still registered as metadata entries and the
in-memory stored_data map serves as the persistence fallback.
Sourcepub fn store_field_data(
&mut self,
field: &PhysicsField,
) -> Result<(), PhysicsError>
pub fn store_field_data( &mut self, field: &PhysicsField, ) -> Result<(), PhysicsError>
Serialize the field data and store it via the registered backends.
The data is written to the in-memory fallback store keyed by field.field_id.
If no backends are registered, an error is returned.
Sourcepub fn retrieve_field_data(&self, field_id: &str) -> Option<Vec<f64>>
pub fn retrieve_field_data(&self, field_id: &str) -> Option<Vec<f64>>
Retrieve previously stored field data by field ID.
Sourcepub fn get_data_layout(&self) -> &DataLayout
pub fn get_data_layout(&self) -> &DataLayout
Get a reference to the data layout.
Sourcepub fn get_data_layout_mut(&mut self) -> &mut DataLayout
pub fn get_data_layout_mut(&mut self) -> &mut DataLayout
Get a mutable reference to the data layout.
Sourcepub fn get_access_patterns(&self) -> &AccessPatterns
pub fn get_access_patterns(&self) -> &AccessPatterns
Get a reference to the access patterns.
Sourcepub fn get_access_patterns_mut(&mut self) -> &mut AccessPatterns
pub fn get_access_patterns_mut(&mut self) -> &mut AccessPatterns
Get a mutable reference to the access patterns.
Auto Trait Implementations§
impl Freeze for PhysicsDataStorage
impl RefUnwindSafe for PhysicsDataStorage
impl Send for PhysicsDataStorage
impl Sync for PhysicsDataStorage
impl Unpin for PhysicsDataStorage
impl UnsafeUnpin for PhysicsDataStorage
impl UnwindSafe for PhysicsDataStorage
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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