pub struct TabDropPolicy {
pub locked_to_pane: Option<PaneId>,
pub locked_to_role: Option<PaneRole>,
pub allowed_panes: Option<Vec<PaneId>>,
pub allowed_roles: Option<Vec<PaneRole>>,
pub blocked_panes: Vec<PaneId>,
pub blocked_roles: Vec<PaneRole>,
}Expand description
Per-tab drop constraints evaluated against the destination pane.
Fields§
§locked_to_pane: Option<PaneId>If set, this tab may only be dropped into the given pane.
locked_to_role: Option<PaneRole>If set, this tab may only be dropped into panes with the given role.
allowed_panes: Option<Vec<PaneId>>If set, this tab may only be dropped into panes in this allow-list.
allowed_roles: Option<Vec<PaneRole>>If set, this tab may only be dropped into panes with roles in this allow-list.
blocked_panes: Vec<PaneId>Panes in this block-list reject this tab even if otherwise allowed.
blocked_roles: Vec<PaneRole>Roles in this block-list reject this tab even if otherwise allowed.
Implementations§
Source§impl TabDropPolicy
impl TabDropPolicy
Sourcepub fn allows_target(&self, pane_id: PaneId, role: Option<PaneRole>) -> bool
pub fn allows_target(&self, pane_id: PaneId, role: Option<PaneRole>) -> bool
Return whether this tab may be dropped into the given pane target.
Pane identity and semantic role are evaluated together. This lets applications express either “only this pane instance” or “any pane with this role” style rules.
Trait Implementations§
Source§impl Clone for TabDropPolicy
impl Clone for TabDropPolicy
Source§fn clone(&self) -> TabDropPolicy
fn clone(&self) -> TabDropPolicy
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 TabDropPolicy
impl Debug for TabDropPolicy
Source§impl Default for TabDropPolicy
impl Default for TabDropPolicy
Source§impl PartialEq for TabDropPolicy
impl PartialEq for TabDropPolicy
Source§fn eq(&self, other: &TabDropPolicy) -> bool
fn eq(&self, other: &TabDropPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for TabDropPolicy
impl StructuralPartialEq for TabDropPolicy
Auto Trait Implementations§
impl Freeze for TabDropPolicy
impl RefUnwindSafe for TabDropPolicy
impl Send for TabDropPolicy
impl Sync for TabDropPolicy
impl Unpin for TabDropPolicy
impl UnsafeUnpin for TabDropPolicy
impl UnwindSafe for TabDropPolicy
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