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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AprV2Flags
impl Debug for AprV2Flags
Source§impl Default for AprV2Flags
impl Default for AprV2Flags
Source§fn default() -> AprV2Flags
fn default() -> AprV2Flags
Source§impl PartialEq for AprV2Flags
impl PartialEq for AprV2Flags
impl Copy for AprV2Flags
impl Eq for AprV2Flags
impl StructuralPartialEq for AprV2Flags
Auto Trait Implementations§
impl Freeze for AprV2Flags
impl RefUnwindSafe for AprV2Flags
impl Send for AprV2Flags
impl Sync for AprV2Flags
impl Unpin for AprV2Flags
impl UnwindSafe for AprV2Flags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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