MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-tui/src/components/toast.rs:38–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37impl Toast {
38 pub fn new() -> Self {
39 Self {
40 message: None,
41 variant: ToastVariant::Info,
42 duration_ms: 3000,
43 phase: ToastPhase::Entering,
44 phase_elapsed_ms: 0,
45 }
46 }
47
48 pub fn show(&mut self, variant: ToastVariant, message: &str, duration_ms: u64) {
49 self.variant = variant;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected