pub enum TxLogMode {
Off,
Memory,
OnMutation,
OnCommit,
}Expand description
Auto-save mode for transaction logs.
Determines when session logs are automatically saved to ~/.ryo/.
Variants§
Off
No automatic saving. Logs exist only in memory. Use this for testing or when you want full control over persistence.
Memory
Keep logs in memory only (current session). Logs are lost when the session ends unless explicitly saved. This is the default for backward compatibility.
OnMutation
Save after each mutation is applied. Most granular tracking, highest I/O overhead. Useful for debugging or when mutations are infrequent.
OnCommit
Save when commit_changes() is called on CodingWorld.
Balanced approach: saves at logical completion points.
Recommended for most use cases.
Implementations§
Source§impl TxLogMode
impl TxLogMode
Sourcepub fn should_persist(&self) -> bool
pub fn should_persist(&self) -> bool
Check if this mode requires automatic persistence.
Sourcepub fn persist_on_mutation(&self) -> bool
pub fn persist_on_mutation(&self) -> bool
Check if this mode persists on each mutation.
Sourcepub fn persist_on_commit(&self) -> bool
pub fn persist_on_commit(&self) -> bool
Check if this mode persists on commit.
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Get a human-readable description.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TxLogMode
impl<'de> Deserialize<'de> for TxLogMode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TxLogMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TxLogMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for TxLogMode
impl Serialize for TxLogMode
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,
impl Copy for TxLogMode
impl Eq for TxLogMode
impl StructuralPartialEq for TxLogMode
Auto Trait Implementations§
impl Freeze for TxLogMode
impl RefUnwindSafe for TxLogMode
impl Send for TxLogMode
impl Sync for TxLogMode
impl Unpin for TxLogMode
impl UnsafeUnpin for TxLogMode
impl UnwindSafe for TxLogMode
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more