pub struct ZoneRequest {
pub name: String,
pub hint: ZoneHint,
pub label: String,
pub preferred_height: u16,
pub preferred_width: u16,
pub min_terminal_width: u16,
pub order: u8,
}Expand description
A plugin’s request to create or own a zone.
Plugins submit requests during registration. The host evaluates
each request and either grants a ZoneId or denies it.
Fields§
§name: StringNamespaced identifier: "{plugin_id}.{local_name}".
hint: ZoneHintWhere the plugin wants the zone.
label: StringDisplay label (for tabs, panel headers).
preferred_height: u16Preferred height in lines (0 = fill available). Ignored for tabs.
preferred_width: u16Preferred width in columns (0 = fill available). Ignored for tabs.
min_terminal_width: u16Minimum terminal width for this zone to appear (0 = always).
order: u8Display order within the zone hint (lower = first).
Implementations§
Source§impl ZoneRequest
impl ZoneRequest
Sourcepub fn tab(name: impl Into<String>, label: impl Into<String>) -> Self
pub fn tab(name: impl Into<String>, label: impl Into<String>) -> Self
Creates a tab zone request.
Creates a sidebar panel zone request.
Sourcepub fn overlay(
name: impl Into<String>,
label: impl Into<String>,
width: u16,
height: u16,
) -> Self
pub fn overlay( name: impl Into<String>, label: impl Into<String>, width: u16, height: u16, ) -> Self
Creates a floating overlay zone request.
Sourcepub fn with_order(self, order: u8) -> Self
pub fn with_order(self, order: u8) -> Self
Sets the display order.
Sourcepub fn with_min_width(self, width: u16) -> Self
pub fn with_min_width(self, width: u16) -> Self
Sets the minimum terminal width.
Trait Implementations§
Source§impl Clone for ZoneRequest
impl Clone for ZoneRequest
Source§fn clone(&self) -> ZoneRequest
fn clone(&self) -> ZoneRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 ZoneRequest
impl RefUnwindSafe for ZoneRequest
impl Send for ZoneRequest
impl Sync for ZoneRequest
impl Unpin for ZoneRequest
impl UnsafeUnpin for ZoneRequest
impl UnwindSafe for ZoneRequest
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more