#[non_exhaustive]pub struct DocumentTab {
pub id: u64,
pub title: String,
pub color: Option<Color>,
pub unsaved: bool,
pub icon: Option<IconName>,
pub closable: bool,
}Expand description
An open document in a DocumentTabs.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: u64What identifies it, whatever its place.
title: StringWhat it is called.
color: Option<Color>A color for telling it apart.
unsaved: boolIt has changes that were not saved.
icon: Option<IconName>An icon before its title.
closable: boolIt has a button that closes it (on by default).
Implementations§
Source§impl DocumentTab
impl DocumentTab
Sourcepub fn color(self, color: Color) -> DocumentTab
pub fn color(self, color: Color) -> DocumentTab
A color for telling it apart.
Sourcepub fn unsaved(self, unsaved: bool) -> DocumentTab
pub fn unsaved(self, unsaved: bool) -> DocumentTab
Whether it has changes that were not saved, shown with a dot.
Sourcepub fn icon(self, icon: IconName) -> DocumentTab
pub fn icon(self, icon: IconName) -> DocumentTab
An icon before its title.
Sourcepub fn closable(self, closable: bool) -> DocumentTab
pub fn closable(self, closable: bool) -> DocumentTab
Whether it has a button that closes it.
Trait Implementations§
Source§impl Clone for DocumentTab
impl Clone for DocumentTab
Source§fn clone(&self) -> DocumentTab
fn clone(&self) -> DocumentTab
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 DocumentTab
impl Debug for DocumentTab
Source§impl PartialEq for DocumentTab
impl PartialEq for DocumentTab
impl StructuralPartialEq for DocumentTab
Auto Trait Implementations§
impl Freeze for DocumentTab
impl RefUnwindSafe for DocumentTab
impl Send for DocumentTab
impl Sync for DocumentTab
impl Unpin for DocumentTab
impl UnsafeUnpin for DocumentTab
impl UnwindSafe for DocumentTab
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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