Skip to main content

codama_nodes/generated/shared/
post_offset_strategy.rs

1use serde::{Deserialize, Serialize};
2
3/// How a post-offset modifier interprets its offset value after serialising the wrapped type.
4#[derive(Debug, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)]
5#[serde(rename_all = "camelCase")]
6pub enum PostOffsetStrategy {
7    /// Move the cursor to the absolute byte position given by the offset.
8    Absolute,
9    /// Pad with zero bytes from the current cursor up to the offset bytes ahead.
10    Padded,
11    /// Restore the cursor to where it was before the wrapped type ran (cancelling its pre-offset).
12    PreOffset,
13    /// Advance the cursor by the offset bytes relative to its current position.
14    Relative,
15}