pub struct AprV2Flags(/* private fields */);Expand description
APR v2 feature flags (16-bit for expanded feature set)
Implementations§
Source§impl AprV2Flags
impl AprV2Flags
Sourcepub const LZ4_COMPRESSED: u16 = 0b0000_0000_0000_0001
pub const LZ4_COMPRESSED: u16 = 0b0000_0000_0000_0001
Payload is compressed with LZ4
Sourcepub const ZSTD_COMPRESSED: u16 = 0b0000_0000_0000_0010
pub const ZSTD_COMPRESSED: u16 = 0b0000_0000_0000_0010
Payload is compressed with Zstd
Sourcepub const HAS_FILTERBANK: u16 = 0b0000_0000_0100_0000
pub const HAS_FILTERBANK: u16 = 0b0000_0000_0100_0000
Has embedded filterbank (for Whisper models)
Sourcepub const HAS_MODEL_CARD: u16 = 0b0000_0000_1000_0000
pub const HAS_MODEL_CARD: u16 = 0b0000_0000_1000_0000
Has model card metadata
Sourcepub const LAYOUT_ROW_MAJOR: u16 = 0b0000_0100_0000_0000
pub const LAYOUT_ROW_MAJOR: u16 = 0b0000_0100_0000_0000
LAYOUT-002: Tensor layout is row-major (REQUIRED for valid APR files) All APR files created after LAYOUT-002 must have this flag set. Pre-LAYOUT-002 files without this flag are assumed row-major.
Sourcepub const LAYOUT_COLUMN_MAJOR: u16 = 0b0000_1000_0000_0000
pub const LAYOUT_COLUMN_MAJOR: u16 = 0b0000_1000_0000_0000
LAYOUT-002: Tensor layout is column-major (FORBIDDEN - Jidoka guard) If this flag is set, the APR file is “dirty” and must be rejected. This flag exists to catch improperly converted GGUF files.
Sourcepub const fn is_lz4_compressed(self) -> bool
pub const fn is_lz4_compressed(self) -> bool
Check if LZ4 compressed
Sourcepub const fn is_zstd_compressed(self) -> bool
pub const fn is_zstd_compressed(self) -> bool
Check if Zstd compressed
Sourcepub const fn is_encrypted(self) -> bool
pub const fn is_encrypted(self) -> bool
Check if encrypted
Sourcepub const fn is_sharded(self) -> bool
pub const fn is_sharded(self) -> bool
Check if sharded
Sourcepub const fn is_quantized(self) -> bool
pub const fn is_quantized(self) -> bool
Check if quantized
Sourcepub const fn is_row_major(self) -> bool
pub const fn is_row_major(self) -> bool
LAYOUT-002: Check if row-major layout flag is set
Sourcepub const fn is_column_major(self) -> bool
pub const fn is_column_major(self) -> bool
LAYOUT-002: Check if column-major layout flag is set (should be rejected)
Sourcepub const fn is_layout_valid(self) -> bool
pub const fn is_layout_valid(self) -> bool
LAYOUT-002: Validate layout is safe for inference Returns true if the file is row-major or pre-LAYOUT-002 (assumed row-major) Returns false if explicitly marked as column-major (dirty APR file)
Trait Implementations§
Source§impl Clone for AprV2Flags
impl Clone for AprV2Flags
Source§fn clone(&self) -> AprV2Flags
fn clone(&self) -> AprV2Flags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more