pub struct BinConfig {
pub name: String,
pub alphabet: Alphabet,
pub code_length: usize,
pub check_position: CheckPosition,
pub secret_key: String,
pub storage_key: String,
pub storage_encryption_enabled: bool,
pub damm_table: DammTable,
pub counter_mode: CounterMode,
pub format: CodeFormat,
pub audit: AuditInfo,
}Expand description
Configuration stored in a .bin file.
Fields§
§name: StringName/identifier for this configuration
alphabet: AlphabetAlphabet for code generation
code_length: usizeNumber of random characters (not including check digit)
check_position: CheckPositionPosition of check digit (index-based)
secret_key: String256-bit secret key for HMAC (hex encoded)
storage_key: String256-bit storage key for database encryption (hex encoded)
storage_encryption_enabled: boolWhether storage encryption is enabled
damm_table: DammTableDamm table for check digit calculation
counter_mode: CounterModeCounter storage mode
format: CodeFormatCode formatting (prefix, suffix, separators)
audit: AuditInfoAudit trail
Implementations§
Source§impl BinConfig
impl BinConfig
Sourcepub fn base_code_length(&self) -> usize
pub fn base_code_length(&self) -> usize
Get the base code length (code_length + 1 for check digit).
Sourcepub fn total_code_length(&self) -> usize
pub fn total_code_length(&self) -> usize
Get the total formatted code length.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BinConfig
impl<'de> Deserialize<'de> for BinConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BinConfig
impl RefUnwindSafe for BinConfig
impl Send for BinConfig
impl Sync for BinConfig
impl Unpin for BinConfig
impl UnwindSafe for BinConfig
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
Mutably borrows from an owned value. Read more