pub enum ModelineZone {
Auto,
Ids(Vec<Arc<str>>),
}Expand description
Variants§
Auto
Use the producer-registered descriptor placement for this zone (the built-in default). The default variant: with no config a newly-registered mode element appears in its descriptor’s zone automatically (preserves extensibility, paramount #2).
Ids(Vec<Arc<str>>)
An explicit, ordered list of element ids. Unknown / unregistered
ids are skipped + logged by the host layout resolver
(lattice_host::modeline); an empty list is an explicitly-blank
zone (distinct from Auto).
Implementations§
Trait Implementations§
Source§impl Clone for ModelineZone
impl Clone for ModelineZone
Source§fn clone(&self) -> ModelineZone
fn clone(&self) -> ModelineZone
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 moreSource§impl Debug for ModelineZone
impl Debug for ModelineZone
Source§impl Default for ModelineZone
impl Default for ModelineZone
Source§fn default() -> ModelineZone
fn default() -> ModelineZone
Returns the “default value” for a type. Read more
impl Eq for ModelineZone
Source§impl OptionType for ModelineZone
impl OptionType for ModelineZone
Source§fn enumerate() -> Option<Vec<&'static str>>
fn enumerate() -> Option<Vec<&'static str>>
The id space is open-ended (built-ins + any mode/plugin element),
so there is no fixed completion set — auto is surfaced as the
one keyword form.
Source§fn accepts_list() -> bool
fn accepts_list() -> bool
ML.5: this is the list-shaped option the loader joins TOML arrays
into. See OptionType::accepts_list + loader::apply_array.
Source§fn parse(s: &str) -> Result<Self, String>
fn parse(s: &str) -> Result<Self, String>
Parse the right-hand side of
: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
Render the current value back to a 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
Short type label for
:describe-option ("boolean",
"foldmethod", etc.). Used in help bodies and the customize
buffer view.Source§fn enumerate_with_docs() -> Option<Vec<EnumeratedValue>>
fn enumerate_with_docs() -> Option<Vec<EnumeratedValue>>
Optional: enumerate valid string forms WITH per-value doc
strings for the cmdline-completion marginalia column.
Default impl wraps
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>
Optional: alternative name forms this type accepts for the
option name itself. Used by completion to surface the name
alongside its negation (
:set nu / :set nonu). Default:
no extra forms. Booleans return [format!("no{canonical}")].Source§fn is_bool() -> bool
fn is_bool() -> bool
Whether this type’s option supports
:set noFOO. bool
returns true; everything else false. Drives the negate
path in the cmdline parser.Source§fn try_negation_value() -> Result<Self, String>
fn try_negation_value() -> Result<Self, String>
Negation value (only meaningful for
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 enumerate_is_exhaustive() -> bool
fn enumerate_is_exhaustive() -> bool
Whether
Self::enumerate is the COMPLETE set of valid values
(a closed enum) or a completion hint over an open space. Read moreSource§fn schema() -> ConfigSchema
fn schema() -> ConfigSchema
The declared shape of this type’s values. Read more
Source§fn to_value(&self) -> ConfigValue
fn to_value(&self) -> ConfigValue
This value as a schema-shaped tree. Read more
Source§fn from_value(value: &ConfigValue) -> Result<Self, String>
fn from_value(value: &ConfigValue) -> Result<Self, String>
Rebuild from a tree. Default: the inverse of
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 ModelineZone
impl PartialEq for ModelineZone
impl StructuralPartialEq for ModelineZone
Auto Trait Implementations§
impl Freeze for ModelineZone
impl RefUnwindSafe for ModelineZone
impl Send for ModelineZone
impl Sync for ModelineZone
impl Unpin for ModelineZone
impl UnsafeUnpin for ModelineZone
impl UnwindSafe for ModelineZone
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
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
Compare self to
key and return true if they are equal.