pub enum AutoUpdateMode {
Off,
Notify,
Install,
}Expand description
How kotonoha keeps itself up to date in the background.
On every kotonoha serve launch the binary can quietly check GitHub
for a newer release and — depending on this mode — install it in the
background (the running process keeps the old binary; the new version
applies on the next launch). Mirrors the auto-update modes used across
the yukimemi/* CLIs.
off— do nothing.notify— only print a banner when a newer release exists; never install.install(default) — silently download + swap the binary in the background, then print a one-line “restart to apply” notice.
The KOTONOHA_NO_AUTOUPDATE env var (non-empty and not "0"/"false")
overrides this to off, regardless of config.
Variants§
Off
No background update activity at all.
Notify
Print a banner when a newer release exists, but never install.
Install
Silently install a newer release in the background (default).
Trait Implementations§
Source§impl Clone for AutoUpdateMode
impl Clone for AutoUpdateMode
Source§fn clone(&self) -> AutoUpdateMode
fn clone(&self) -> AutoUpdateMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AutoUpdateMode
Source§impl Debug for AutoUpdateMode
impl Debug for AutoUpdateMode
Source§impl Default for AutoUpdateMode
impl Default for AutoUpdateMode
Source§fn default() -> AutoUpdateMode
fn default() -> AutoUpdateMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AutoUpdateMode
impl<'de> Deserialize<'de> for AutoUpdateMode
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
impl Eq for AutoUpdateMode
Source§impl PartialEq for AutoUpdateMode
impl PartialEq for AutoUpdateMode
Source§fn eq(&self, other: &AutoUpdateMode) -> bool
fn eq(&self, other: &AutoUpdateMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AutoUpdateMode
Auto Trait Implementations§
impl Freeze for AutoUpdateMode
impl RefUnwindSafe for AutoUpdateMode
impl Send for AutoUpdateMode
impl Sync for AutoUpdateMode
impl Unpin for AutoUpdateMode
impl UnsafeUnpin for AutoUpdateMode
impl UnwindSafe for AutoUpdateMode
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