pub struct ImmutableConfig {
pub enabled: bool,
pub locked_at: Option<Timestamp>,
pub lock_signature: Option<ImmutableSignature>,
pub governance_key: Option<Vec<u8>>,
pub locked_config_hash: Option<Hash>,
pub grace_period_seconds: u64,
}Expand description
Immutable deployment configuration
Fields§
§enabled: boolWhether immutable mode is enabled
locked_at: Option<Timestamp>Timestamp when system was locked (None if not locked)
lock_signature: Option<ImmutableSignature>Quantum-resistant signature that locks the configuration
governance_key: Option<Vec<u8>>Optional governance override key (for emergency situations)
locked_config_hash: Option<Hash>Hash of the configuration that was locked
grace_period_seconds: u64Grace period in seconds before lock takes effect
Implementations§
Source§impl ImmutableConfig
impl ImmutableConfig
Sourcepub fn new() -> ImmutableConfig
pub fn new() -> ImmutableConfig
Create a new immutable config with default settings
Sourcepub fn disable(&mut self) -> Result<(), Error>
pub fn disable(&mut self) -> Result<(), Error>
Disable immutable mode (only allowed if not locked)
Sourcepub fn is_in_grace_period(&self, current_time: Timestamp) -> bool
pub fn is_in_grace_period(&self, current_time: Timestamp) -> bool
Check if the system is in grace period (locked but not yet enforced)
Sourcepub fn is_enforced(&self, current_time: Timestamp) -> bool
pub fn is_enforced(&self, current_time: Timestamp) -> bool
Check if immutable mode is actively enforced
Trait Implementations§
Source§impl Clone for ImmutableConfig
impl Clone for ImmutableConfig
Source§fn clone(&self) -> ImmutableConfig
fn clone(&self) -> ImmutableConfig
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 moreSource§impl Debug for ImmutableConfig
impl Debug for ImmutableConfig
Source§impl Default for ImmutableConfig
impl Default for ImmutableConfig
Source§fn default() -> ImmutableConfig
fn default() -> ImmutableConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ImmutableConfig
impl<'de> Deserialize<'de> for ImmutableConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ImmutableConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ImmutableConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ImmutableConfig
impl Serialize for ImmutableConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ImmutableConfig
impl RefUnwindSafe for ImmutableConfig
impl Send for ImmutableConfig
impl Sync for ImmutableConfig
impl Unpin for ImmutableConfig
impl UnwindSafe for ImmutableConfig
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