Struct CheckpointMetadata
pub struct CheckpointMetadata {
pub kernel_id: String,
pub kernel_type: String,
pub current_step: u64,
pub grid_size: (u32, u32, u32),
pub tile_size: (u32, u32, u32),
pub hlc_timestamp: HlcTimestamp,
pub custom: HashMap<String, String>,
}Expand description
Kernel-specific metadata stored in checkpoint.
Fields§
§kernel_id: StringUnique kernel identifier.
kernel_type: StringKernel type (e.g., “fdtd_3d”, “wave_sim”).
current_step: u64Current simulation step.
grid_size: (u32, u32, u32)Grid dimensions.
tile_size: (u32, u32, u32)Tile/block dimensions.
hlc_timestamp: HlcTimestampHLC timestamp at checkpoint time.
custom: HashMap<String, String>Custom key-value metadata.
Implementations§
§impl CheckpointMetadata
impl CheckpointMetadata
pub fn new(
kernel_id: impl Into<String>,
kernel_type: impl Into<String>,
) -> CheckpointMetadata
pub fn new( kernel_id: impl Into<String>, kernel_type: impl Into<String>, ) -> CheckpointMetadata
Create new metadata for a kernel.
pub fn with_step(self, step: u64) -> CheckpointMetadata
pub fn with_step(self, step: u64) -> CheckpointMetadata
Set current step.
pub fn with_grid_size(
self,
width: u32,
height: u32,
depth: u32,
) -> CheckpointMetadata
pub fn with_grid_size( self, width: u32, height: u32, depth: u32, ) -> CheckpointMetadata
Set grid size.
pub fn with_tile_size(self, x: u32, y: u32, z: u32) -> CheckpointMetadata
pub fn with_tile_size(self, x: u32, y: u32, z: u32) -> CheckpointMetadata
Set tile size.
pub fn with_hlc(self, hlc: HlcTimestamp) -> CheckpointMetadata
pub fn with_hlc(self, hlc: HlcTimestamp) -> CheckpointMetadata
Set HLC timestamp.
pub fn with_custom(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> CheckpointMetadata
pub fn with_custom( self, key: impl Into<String>, value: impl Into<String>, ) -> CheckpointMetadata
Add custom metadata.
pub fn from_bytes(bytes: &[u8]) -> Result<CheckpointMetadata, RingKernelError>
pub fn from_bytes(bytes: &[u8]) -> Result<CheckpointMetadata, RingKernelError>
Deserialize metadata from bytes.
Trait Implementations§
§impl Clone for CheckpointMetadata
impl Clone for CheckpointMetadata
§fn clone(&self) -> CheckpointMetadata
fn clone(&self) -> CheckpointMetadata
Returns a duplicate 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 more§impl Debug for CheckpointMetadata
impl Debug for CheckpointMetadata
§impl Default for CheckpointMetadata
impl Default for CheckpointMetadata
§fn default() -> CheckpointMetadata
fn default() -> CheckpointMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CheckpointMetadata
impl RefUnwindSafe for CheckpointMetadata
impl Send for CheckpointMetadata
impl Sync for CheckpointMetadata
impl Unpin for CheckpointMetadata
impl UnwindSafe for CheckpointMetadata
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.