pub enum Decorations {
Full,
None_,
Transparent,
}Expand description
ui.window.decorations — OS window chrome.
Variants§
Full
System titlebar + controls (the default; today’s behavior).
None_
Borderless: no titlebar / controls. None_ avoids the Option::None
name clash; the on-disk / :set label is none. On macOS this window is
non-resizable (see the design fragment); use transparent if you need
the window to stay resizable / controllable by Raycast/yabai.
Transparent
Frameless-looking but still resizable: a transparent, full-size-content
titlebar with the traffic-light buttons hidden (on macOS, via setHidden:
after the window opens — NOT moved off-screen, which would break the
window’s Accessibility geometry). Unlike none the window keeps
NSResizableWindowMask on macOS, so edge-resize and external window
managers (Raycast/yabai) work. Keeps rounded corners + shadow. The
on-disk / :set label is transparent.
Implementations§
Source§impl Decorations
impl Decorations
Sourcepub fn label(&self) -> &'static str
pub fn label(&self) -> &'static str
The on-disk / :set spelling: full, none or transparent.
The inverse of Self::parse_label and what
OptionType::format emits.
Sourcepub fn doc(&self) -> &'static str
pub fn doc(&self) -> &'static str
One-line description of this value, shown beside it in the
:set ui.window.decorations=<Tab> completion marginalia.
Sourcepub fn is_borderless(&self) -> bool
pub fn is_borderless(&self) -> bool
True when the window is drawn without OS chrome AND is non-resizable
(the macOS titlebar: None case). transparent looks frameless but
stays resizable, so it is NOT borderless by this predicate — the
maximize path relies on this to decide whether zoom works.
Sourcepub fn all() -> [Decorations; 3]
pub fn all() -> [Decorations; 3]
Every value, in completion order. Drives
OptionType::enumerate, so the value set is closed.
Sourcepub fn parse_label(s: &str) -> Result<Self, String>
pub fn parse_label(s: &str) -> Result<Self, String>
Parse a Self::label back into a value. Exact match — no
trimming, no case folding; anything else is an Err naming the
option and the accepted forms.
§Examples
use lattice_config::Decorations;
assert_eq!(Decorations::parse_label("none"), Ok(Decorations::None_));
assert_eq!(Decorations::None_.label(), "none");
// `transparent` looks frameless but is not "borderless": it stays resizable.
assert!(!Decorations::Transparent.is_borderless());
assert!(Decorations::parse_label("None").is_err());Trait Implementations§
Source§impl Clone for Decorations
impl Clone for Decorations
Source§fn clone(&self) -> Decorations
fn clone(&self) -> Decorations
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Decorations
Source§impl Debug for Decorations
impl Debug for Decorations
Source§impl Default for Decorations
impl Default for Decorations
Source§fn default() -> Decorations
fn default() -> Decorations
impl Eq for Decorations
Source§impl OptionType for Decorations
impl OptionType for Decorations
Source§fn enumerate_is_exhaustive() -> bool
fn enumerate_is_exhaustive() -> bool
TC.1: closed — parse accepts these forms and nothing else, so
the schema is an enum and :customize can offer a picker.
Source§fn parse(s: &str) -> Result<Self, String>
fn parse(s: &str) -> Result<Self, String>
:set name=value. Errors are
surfaced verbatim through the cmdline echo, so the message
should read well to the user (mention valid forms when the
space is finite). The parser MUST round-trip with format:
T::parse(&v.format()) == Ok(v) for every v.Source§fn format(&self) -> String
fn format(&self) -> String
:set foo? echo,
the customize buffer view, value comparison). Round-trips
with Self::parse.Source§fn type_label() -> &'static str
fn type_label() -> &'static str
:describe-option ("boolean",
"foldmethod", etc.). Used in help bodies and the customize
buffer view.Source§fn enumerate() -> Option<Vec<&'static str>>
fn enumerate() -> Option<Vec<&'static str>>
:set foo=<Tab>
completion. None means “free-form” (no enumerable space –
integers, file paths, free strings). The values are
&'static str to keep the completion source allocation-free
in the common case.Source§fn enumerate_with_docs() -> Option<Vec<EnumeratedValue>>
fn enumerate_with_docs() -> Option<Vec<EnumeratedValue>>
Self::enumerate with empty docs;
types with rich help override. Read moreSource§fn name_forms(_canonical: &str) -> Vec<String>
fn name_forms(_canonical: &str) -> Vec<String>
:set nu / :set nonu). Default:
no extra forms. Booleans return [format!("no{canonical}")].Source§fn is_bool() -> bool
fn is_bool() -> bool
:set noFOO. bool
returns true; everything else false. Drives the negate
path in the cmdline parser.Source§fn accepts_list() -> bool
fn accepts_list() -> bool
Self::parse accepts, rather than rejected
as “not applicable to a scalar option”. false for every
scalar type (the default); true for list types like
crate::ModelineZone. Drives loader::apply_array (ML.5).
The :set cmdline path is unaffected — it always passes a
string and never sees a TOML array.Source§fn try_negation_value() -> Result<Self, String>
fn try_negation_value() -> Result<Self, String>
Self::is_bool true).
Default: returns Err – the registry guards by checking
is_bool() first, so callers that respect the contract
won’t observe this. The bool impl returns Ok(false).Source§fn schema() -> ConfigSchema
fn schema() -> ConfigSchema
Source§fn to_value(&self) -> ConfigValue
fn to_value(&self) -> ConfigValue
Source§fn from_value(value: &ConfigValue) -> Result<Self, String>
fn from_value(value: &ConfigValue) -> Result<Self, String>
Self::to_value,
deferring to parse so a type’s validation rules apply on this
path exactly as they do on :set.Source§impl PartialEq for Decorations
impl PartialEq for Decorations
impl StructuralPartialEq for Decorations
Auto Trait Implementations§
impl Freeze for Decorations
impl RefUnwindSafe for Decorations
impl Send for Decorations
impl Sync for Decorations
impl Unpin for Decorations
impl UnsafeUnpin for Decorations
impl UnwindSafe for Decorations
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.