pub struct ModelineElement {
pub id: ElementId,
pub zone: Zone,
pub priority: i32,
pub scope: Scope,
pub interaction: Option<Interaction>,
}Expand description
Static descriptor for a modeline element. Registered once into the
ModelineRegistry; its ElementContent lives separately in the
host content store and updates over the event bus (ML.3).
Fields§
§id: ElementIdNamespaced identity; also the content-store key.
zone: ZoneWhich block of the modeline the element sits in.
priority: i32Order within the zone (see ModelineRegistry::zone_ordered).
scope: ScopeEvery pane (per-buffer content) or the active pane only.
interaction: Option<Interaction>Designed now; honoured by the renderer in ML.4.
Implementations§
Source§impl ModelineElement
impl ModelineElement
Sourcepub fn new(id: ElementId, zone: Zone, priority: i32) -> Self
pub fn new(id: ElementId, zone: Zone, priority: i32) -> Self
Minimal descriptor: pane-local, no interaction.
Sourcepub fn with_scope(self, scope: Scope) -> Self
pub fn with_scope(self, scope: Scope) -> Self
Builder: set the Scope.
Sourcepub fn with_interaction(self, interaction: Interaction) -> Self
pub fn with_interaction(self, interaction: Interaction) -> Self
Builder: attach click / hover behaviour.
Trait Implementations§
Source§impl Clone for ModelineElement
impl Clone for ModelineElement
Source§fn clone(&self) -> ModelineElement
fn clone(&self) -> ModelineElement
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 moreAuto Trait Implementations§
impl Freeze for ModelineElement
impl RefUnwindSafe for ModelineElement
impl Send for ModelineElement
impl Sync for ModelineElement
impl Unpin for ModelineElement
impl UnsafeUnpin for ModelineElement
impl UnwindSafe for ModelineElement
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