Guide API
Skip to main content

Role

Enum Role 

Source
pub enum Role {
Show 82 variants Background, FrameActive, FramePassive, FrameDragging, FrameIcon, FrameGrayActive, FrameGrayPassive, FrameGrayDragging, FrameGrayIcon, FrameCyanActive, FrameCyanPassive, FrameCyanDragging, FrameCyanIcon, HistoryArrow, HistorySides, HistoryViewerNormal, HistoryViewerFocused, ScrollBarPage, ScrollBarControls, Normal, Focused, Disabled, Pressed, ListNormal, ListInactive, ListSurface, ListFocused, ListSelected, ListDivider, TableHeader, TableCellCursor, Error, Warning, Info, Success, StaticText, ClusterNormal, ClusterSelected, ClusterNormalShortcut, ClusterSelectedShortcut, ClusterDisabled, IndicatorNormal, IndicatorDragging, ButtonNormal, ButtonDefault, ButtonSelected, ButtonDisabled, ButtonNormalShortcut, ButtonDefaultShortcut, ButtonSelectedShortcut, ButtonShadow, LabelNormal, LabelLight, LabelNormalShortcut, LabelLightShortcut, InputNormal, InputInactive, InputSurface, InputSelected, InputArrow, ScrollerNormal, ScrollerSelected, MenuNormal, MenuNormalShortcut, MenuSelected, MenuSelectedShortcut, MenuDisabled, MenuSelectedDisabled, StatusNormal, StatusShortcut, StatusSelect, StatusShortcutSelect, StatusDisabled, StatusSelDisabled, InfoPane, OutlineNormal, OutlineInactive, OutlineSurface, OutlineFocused, OutlineSelected, OutlineNotExpanded, Shadow,
}
Expand description

A semantic colour role — the key a widget uses to ask the Theme for a Style.

This enum is closed and first-party (not app-extensible).

§Window palette families and the Role enum

The original framework used per-widget 32-slot palette strings (CGrayDialog, CBlueDialog, CCyanDialog, cpBlueWindow, cpCyanWindow) indexed by a chained lookup through the owner hierarchy. tvision-rs collapses that entire chain into named roles:

C++ palette schemeWindow / dialog typeRust Role family
cpBlueWindow / CBlueDialogWindowPalette::Blue windows and dialogsRole::Frame* (Active/Passive/Dragging/Icon)
cpGrayWindow / CGrayDialogWindowPalette::Gray dialogsRole::FrameGray*
cpCyanWindow / CCyanDialogWindowPalette::Cyan windowsRole::FrameCyan*

The frame widget selects the correct Frame* family at draw time based on the owner window’s WindowPalette. Descendant widgets (buttons, inputs, clusters, lists, …) pick their own named Role::* regardless of the window palette — the realistic owner assumption baked into classic_blue’s derivation comments is always a CGrayDialog for dialog-hosted widgets.

§Turbo Vision heritage

Each colour lookup in the original framework maps to one named role here (deviation D7).

Variants§

§

Background

The desktop background fill — the ░/·/space pattern drawn by Background::draw across the entire desktop area behind all windows. In classic_blue this is lightgray on blue (BIOS 0x71), resolved from the C++ chain cpBackground[1]=0x01 → cpAppColor[1]=0x71.

§

FrameActive

An active (focused) blue-scheme window frame — the border drawn by Frame when the owning window has keyboard focus and WindowPalette is Blue (the default). In classic_blue this is white on blue (0x1F), resolved from cpFrame[3]=0x02 → cpBlueWindow[2]=0x09 → cpAppColor[9]=0x1F.

§

FramePassive

A passive (unfocused) blue-scheme window frame — the border drawn by Frame when the owning window does not have keyboard focus and WindowPalette is Blue. In classic_blue this is lightgray on blue (0x17), resolved from cpFrame[1]=0x01 → cpBlueWindow[1]=0x08 → cpAppColor[8]=0x17.

§

FrameDragging

A blue-scheme frame while the window is being dragged or resized — drawn by Frame when sfDragging is set and WindowPalette is Blue. In classic_blue this is lightgreen on blue (0x1A), resolved from cpFrame[5]=0x03 → cpBlueWindow[3]=0x0A → cpAppColor[10]=0x1A.

§

FrameIcon

A blue-scheme frame icon — the close [×], zoom [↑]/[↓], and resize [⟺] glyphs drawn by Frame when WindowPalette is Blue. In classic_blue this is lightgreen on blue (0x1A), the same attribute as FrameDragging (both resolve via cpFrame[5]=0x03 → cpBlueWindow[3]=0x0A → cpAppColor[10]=0x1A).

§

FrameGrayActive

An active (focused) gray-scheme frame (dialogs and gray windows). The frame selects the FrameGray* family when its owner’s WindowPalette is Gray. In classic_blue this is white on lightgray (0x7F), resolved from cpFrame[3]=0x02 → cpGrayDialog[2]=0x21 → cpAppColor[33]=0x7F.

§

FrameGrayPassive

A passive (unfocused) gray-scheme frame — drawn by Frame when the owning window lacks focus and WindowPalette is Gray. In classic_blue this is black on lightgray (0x70), resolved from cpFrame[1]=0x01 → cpGrayDialog[1]=0x20 → cpAppColor[32]=0x70.

§

FrameGrayDragging

A gray-scheme frame while the window is being dragged or resized. Drawn by Frame when sfDragging is set and WindowPalette is Gray. In classic_blue this is lightgreen on lightgray (0x7A), resolved from cpFrame[5]=0x03 → cpGrayDialog[3]=0x22 → cpAppColor[34]=0x7A.

§

FrameGrayIcon

A gray-scheme frame icon — the close, zoom, and resize glyphs drawn by Frame when WindowPalette is Gray. In classic_blue this is lightgreen on lightgray (0x7A), the same attribute as FrameGrayDragging (both resolve via cpFrame[5]=0x03 → cpGrayDialog[3]=0x22 → cpAppColor[34]=0x7A).

§

FrameCyanActive

An active (focused) cyan-scheme frame (cyan windows). The frame selects the FrameCyan* family when its owner’s WindowPalette is Cyan. In classic_blue this is white on cyan (0x3F), resolved from cpFrame[3]=0x02 → cpCyanWindow[2]=0x11 → cpAppColor[17]=0x3F.

§

FrameCyanPassive

A passive (unfocused) cyan-scheme frame — drawn by Frame when the owning window lacks focus and WindowPalette is Cyan. In classic_blue this is lightgray on cyan (0x37), resolved from cpFrame[1]=0x01 → cpCyanWindow[1]=0x10 → cpAppColor[16]=0x37.

§

FrameCyanDragging

A cyan-scheme frame while the window is being dragged or resized. Drawn by Frame when sfDragging is set and WindowPalette is Cyan. In classic_blue this is lightgreen on cyan (0x3A), resolved from cpFrame[5]=0x03 → cpCyanWindow[3]=0x12 → cpAppColor[18]=0x3A.

§

FrameCyanIcon

A cyan-scheme frame icon — the close, zoom, and resize glyphs drawn by Frame when WindowPalette is Cyan. In classic_blue this is lightgreen on cyan (0x3A), the same attribute as FrameCyanDragging (both resolve via cpFrame[5]=0x03 → cpCyanWindow[3]=0x12 → cpAppColor[18]=0x3A).

§

HistoryArrow

The ↓ arrow glyph of the history-dropdown icon drawn by THistory. Sits in the center cell of the three-cell icon ▐~↓~▌. In classic_blue this is black on green (0x20), resolved from cpHistory[1]=0x16 → cpGrayDialog[22]=0x35 → cpAppColor[53]=0x20.

§

HistorySides

The ▐ and ▌ side-block glyphs of the history-dropdown icon drawn by THistory. Frames the center arrow on both sides. In classic_blue this is green on lightgray (0x72), resolved from cpHistory[2]=0x17 → cpGrayDialog[23]=0x36 → cpAppColor[54]=0x72.

§

HistoryViewerNormal

A normal item in the history dropdown list. One role serves the active/inactive normals, the selected item, and the divider (they all share a colour; surfaced through ListViewer::list_roles).

§

HistoryViewerFocused

The focused (cursor) item in the history dropdown list.

§

ScrollBarPage

A scroll-bar page (trough) area — the ▒ fill between the thumb and the arrow buttons, drawn by ScrollBar::draw. In classic_blue this is blue on cyan (0x31), resolved from cpScrollBar[1]=0x04 → cpBlueWindow[4]=0x0B → cpAppColor[11]=0x31.

§

ScrollBarControls

Scroll-bar control glyphs (arrows and thumb) — the ▲/▼/◄/► arrow buttons and the ■ thumb indicator drawn by ScrollBar::draw. In classic_blue this is blue on cyan (0x31), the same as ScrollBarPage (indices 2 and 3 in cpScrollBar both resolve to the same color).

§

Normal

Generic enabled control text — used by widgets that need a simple active/normal color without a dedicated role family. In classic_blue this is black on cyan (0x30). Used by the theme editor’s role list and any custom widget that reaches for a sensible default.

§

Focused

A focused control — the highlight color applied to whichever view currently holds keyboard focus, used by the theme editor’s focused-row highlight. In classic_blue this is white on green (0x2F).

§

Disabled

A disabled (greyed-out) control — used by widgets to render inactive content that cannot receive input. In classic_blue this is darkgray on blue (0x18).

§

Pressed

A pressed control (e.g. a button mid-click) — the transient style while a mouse button is held down. In classic_blue this is white on green (0x2F), matching Focused.

§

ListNormal

A normal item’s row surface in a ListViewer whose owning pane is active (see DrawCtx::owner_active) — and also the empty-list fill. In classic_blue this is black on cyan (0x30), resolved from cpListViewer[1]=0x1A → cpGrayDialog[26]=0x39 → cpAppColor[57]=0x30.

§

ListInactive

A normal item’s row surface in a ListViewer whose owning pane is inactive — recedes as a unit with the rest of the pane’s content, independent of whether this particular list is the current control. In classic_blue this matches ListNormal — both palette indices resolve to the same dialog entry (0x1A).

§

ListSurface

The middle content surface of a ListViewer: its owning pane is active but a selectable sibling holds focus (the three-surface rule, DrawCtx::content_surface). In classic_blue it equals ListNormal, preserving classic per-window uniformity; a theme opts into sibling distinction by giving it the pane-surface colour.

§

ListFocused

The focused (cursor) item of an active ListViewer. In classic_blue this is white on green (0x2F), resolved from cpListViewer[3]=0x1B → cpGrayDialog[27]=0x3A → cpAppColor[58]=0x2F.

§

ListSelected

A selected (marked) item in a ListViewer that supports multi-select. In classic_blue this is yellow on cyan (0x3E), resolved from cpListViewer[4]=0x1C → cpGrayDialog[28]=0x3B → cpAppColor[59]=0x3E.

§

ListDivider

The inter-column divider │ in a multi-column ListViewer. In classic_blue this is blue on cyan (0x31), resolved from cpListViewer[5]=0x1D → cpGrayDialog[29]=0x3C → cpAppColor[60]=0x31.

§

TableHeader

The column-label row of a Table, including the sort marker. A tvision-rs-native role with no C++ palette ancestor (Turbo Vision has no table); in classic_blue it is yellow on blue (0x1E), a header bar that stands apart from the cyan list rows.

§

TableCellCursor

The cell cursor of a Table with editable columns: the cell on the focused row that Enter or F2 would edit. A tvision-rs-native role; in classic_blue it is black on light gray (0x70), distinct from the focused row (white on green) and from the input line (white on blue) that opens over the cell.

§

Error

Error feedback — for widgets or dialogs that need to highlight an error state. In classic_blue this is white on red (0x4F). This is a tvision-rs-native role with no C++ palette ancestor.

§

Warning

Warning feedback — for widgets or dialogs that need to highlight a warning. In classic_blue this is black on brown (0x60). This is a tvision-rs-native role with no C++ palette ancestor.

§

Info

Informational feedback — for widgets or dialogs that need an informational highlight. In classic_blue this is white on blue (0x1F). This is a tvision-rs-native role with no C++ palette ancestor.

§

Success

Success feedback — for widgets or dialogs that need a success highlight. In classic_blue this is white on green (0x2F). This is a tvision-rs-native role with no C++ palette ancestor.

§

StaticText

Static (label/caption) text — the style applied to the body of a StaticText or ParamText widget. In classic_blue this is black on lightgray (0x70), matching the gray-dialog surface. Resolved from cpStaticText[1]=0x06 → cpGrayDialog[6]=0x25 → cpAppColor[37]=0x70.

§

ClusterNormal

A cluster item’s normal (unselected) text — drawn by CheckBoxes and RadioButtons for each item that is neither the focused cursor row nor disabled. In classic_blue this is black on cyan (0x30), resolved from cpCluster[1]=0x10 → cpGrayDialog[16]=0x2F → cpAppColor[47]=0x30.

§

ClusterSelected

A cluster item’s selected (cursor) text — the row under the keyboard cursor when the cluster has focus. In classic_blue this is white on cyan (0x3F), resolved from cpCluster[2]=0x11 → cpGrayDialog[17]=0x30 → cpAppColor[48]=0x3F.

§

ClusterNormalShortcut

A cluster item’s shortcut highlight in the normal (unselected) state — the hotkey letter shown in a distinct color. In classic_blue this is yellow on cyan (0x3E), resolved from cpCluster[3]=0x12 → cpGrayDialog[18]=0x31 → cpAppColor[49]=0x3E.

§

ClusterSelectedShortcut

A cluster item’s shortcut highlight in the selected (cursor) state. In classic_blue this matches ClusterNormalShortcut — both palette indices (cpCluster[3] and cpCluster[4]) resolve to the same dialog entry (0x12), giving yellow on cyan (0x3E).

§

ClusterDisabled

A disabled cluster item’s text — drawn when the whole cluster has its disabled state flag set. In classic_blue this is darkgray on cyan (0x38), resolved from cpCluster[5]=0x1F → cpGrayDialog[31]=0x3E → cpAppColor[62]=0x38.

§

IndicatorNormal

The line/column position indicator drawn by Indicator when its owner window is not being dragged/resized. In classic_blue this is white on blue (0x1F), resolved from cpIndicator[1]=0x02 → cpBlueWindow[2]=0x09 → cpAppColor[9]=0x1F.

§

IndicatorDragging

The line/column position indicator drawn by Indicator while its owner window is being dragged or resized. In classic_blue this is lightgreen on blue (0x1A), resolved from cpIndicator[2]=0x03 → cpBlueWindow[3]=0x0A → cpAppColor[10]=0x1A. The ═ frame glyph also changes to ─ during drag.

§

ButtonNormal

A Button’s face text when it is neither the default button, nor focused, nor disabled. In classic_blue this is black on green (0x20), resolved from cpButton[1]=0x0A → cpGrayDialog[10]=0x29 → cpAppColor[41]=0x20.

§

ButtonDefault

A Button’s face text when it is the default button (the one activated by Enter when no other button is focused). In classic_blue this is lightcyan on green (0x2B), resolved from cpButton[2]=0x0B → cpGrayDialog[11]=0x2A → cpAppColor[42]=0x2B.

§

ButtonSelected

A Button’s face text while it is selected (mouse-pressed or keyboard-activated). In classic_blue this is white on green (0x2F), resolved from cpButton[3]=0x0C → cpGrayDialog[12]=0x2B → cpAppColor[43]=0x2F.

§

ButtonDisabled

A Button’s face text when the button is disabled. In classic_blue this is darkgray on lightgray (0x78), resolved from cpButton[4]=0x0D → cpGrayDialog[13]=0x2C → cpAppColor[44]=0x78.

§

ButtonNormalShortcut

A Button’s hotkey letter highlight in the normal state. In classic_blue this is yellow on green (0x2E), resolved from cpButton[5]=0x0E → cpGrayDialog[14]=0x2D → cpAppColor[45]=0x2E.

§

ButtonDefaultShortcut

A Button’s hotkey letter highlight in the default state. In classic_blue this matches ButtonNormalShortcut — all three shortcut indices resolve to the same dialog entry (cpButton[6]=0x0E).

§

ButtonSelectedShortcut

A Button’s hotkey letter highlight in the selected state. In classic_blue this matches ButtonNormalShortcut — cpButton[7]=0x0E resolves to the same dialog entry as indices 5 and 6.

§

ButtonShadow

The drop-shadow cells drawn one column to the right and one row below a Button’s bounding box. In classic_blue this is black on lightgray (0x70), resolved from cpButton[8]=0x0F → cpGrayDialog[15]=0x2E → cpAppColor[46]=0x70.

§

LabelNormal

A Label’s caption text when its linked control is unfocused (the label is “dark”). In classic_blue this is black on lightgray (0x70), resolved from cpLabel[1]=0x07 → cpGrayDialog[7]=0x26 → cpAppColor[38]=0x70.

§

LabelLight

A Label’s caption text when its linked control has focus (the label is “lit”). In classic_blue this is white on lightgray (0x7F), resolved from cpLabel[2]=0x08 → cpGrayDialog[8]=0x27 → cpAppColor[39]=0x7F.

§

LabelNormalShortcut

A Label’s hotkey letter highlight in the dark (unfocused) state. In classic_blue this is yellow on lightgray (0x7E), resolved from cpLabel[3]=0x09 → cpGrayDialog[9]=0x28 → cpAppColor[40]=0x7E.

§

LabelLightShortcut

A Label’s hotkey letter highlight in the lit (focused) state. In classic_blue this matches LabelNormalShortcut — cpLabel[4]=0x09 resolves to the same dialog entry as index 3. Kept as a distinct role so future theming can give the lit shortcut a different colour.

§

InputNormal

An InputLine’s field text — applied to the entire field area regardless of focus state (the C++ palette uses the same byte for both passive and active). In classic_blue this is white on blue (0x1F), resolved from cpInputLine[1]=cpInputLine[2]=0x13 → cpGrayDialog[19]=0x32 → cpAppColor[50]=0x1F.

§

InputInactive

An input line’s background when its owning pane is inactive (see DrawCtx::owner_active) — every field in the pane recedes together, regardless of which field itself holds focus. Heritage: this is the C++ cpInputLine[1] slot (TInputLine::draw selects it via getColor(sfFocused ? 2 : 1), the unfocused entry); tvision-rs repurposes it onto the owning-pane axis. In classic_blue it equals InputNormal; a theme may dim it to signal an inactive pane.

§

InputSurface

The middle content surface of an InputLine: its owning pane is active but a selectable sibling holds focus (the three-surface rule, DrawCtx::content_surface). In classic_blue it equals InputNormal, preserving classic per-window uniformity; a theme opts into sibling distinction by giving it the pane-surface colour.

§

InputSelected

An InputLine’s selection highlight — the text region between the cursor and the mark anchor. In classic_blue this is white on green (0x2F), resolved from cpInputLine[3]=0x14 → cpGrayDialog[20]=0x33 → cpAppColor[51]=0x2F.

§

InputArrow

The ◄/► overflow-scroll arrows shown at the left/right edge of an InputLine when the field content is wider than the visible area. In classic_blue this is lightgreen on blue (0x1A), resolved from cpInputLine[4]=0x15 → cpGrayDialog[21]=0x34 → cpAppColor[52]=0x1A.

§

ScrollerNormal

A Scroller’s / Editor’s content fill — applied to every cell of the scrollable area that does not carry selected text. The realistic owner is a blue window (the most common scroller/editor container). In classic_blue this is yellow on blue (0x1E), resolved from cpScroller[1]=0x06 → cpBlueWindow[6]=0x0D → cpAppColor[13]=0x1E.

§

ScrollerSelected

A Scroller’s / Editor’s selected-text (highlighted) fill — applied to cells within the current selection. In classic_blue this is blue on lightgray (0x71), resolved from cpScroller[2]=0x07 → cpBlueWindow[7]=0x0E → cpAppColor[14]=0x71.

§

MenuNormal

A MenuBar / MenuBox normal item text — and also the bar’s background fill between items. Used by MenuColors::resolve. In classic_blue this is black on lightgray (0x70), resolved in one hop: cpMenuView[1]=0x02 → cpAppColor[2]=0x70 (menus are owned directly by the program, no window remap).

§

MenuNormalShortcut

A menu’s normal item shortcut letter highlight. In classic_blue this is red on lightgray (0x74), resolved from cpMenuView[3]=0x04 → cpAppColor[4]=0x74.

§

MenuSelected

A menu’s selected (highlighted cursor) item text. In classic_blue this is black on green (0x20), resolved from cpMenuView[4]=0x05 → cpAppColor[5]=0x20.

§

MenuSelectedShortcut

A menu’s selected item shortcut letter highlight. In classic_blue this is red on green (0x24), resolved from cpMenuView[6]=0x07 → cpAppColor[7]=0x24.

§

MenuDisabled

A menu’s disabled item text (no separate shortcut highlight is applied when an item is disabled). In classic_blue this is darkgray on lightgray (0x78), resolved from cpMenuView[2]=0x03 → cpAppColor[3]=0x78.

§

MenuSelectedDisabled

A menu’s selected-and-disabled item text — the cursor rests on an item that is in the disabled command set. In classic_blue this is darkgray on green (0x28), resolved from cpMenuView[5]=0x06 → cpAppColor[6]=0x28.

§

StatusNormal

The normal (non-selected, enabled) item text and row background fill drawn by StatusLine. Applied to both the item label text and any unfilled cells in the status row. In classic_blue this is black on lightgray (0x70), resolved from cpStatusLine[1]=0x02 → cpAppColor[2]=0x70.

§

StatusShortcut

The shortcut-key highlight within a normal (non-selected) status item, drawn by StatusLine over the key character. In classic_blue this is red on lightgray (0x74), resolved from cpStatusLine[3]=0x04 → cpAppColor[4]=0x74.

§

StatusSelect

The text of the currently hovered (selected/pressed) status item, drawn by StatusLine when the mouse cursor rests on an enabled item. In classic_blue this is black on green (0x20), resolved from cpStatusLine[4]=0x05 → cpAppColor[5]=0x20.

§

StatusShortcutSelect

The shortcut-key highlight within a hovered status item — the key character rendered by StatusLine while the item is selected. In classic_blue this is red on green (0x24), resolved from cpStatusLine[6]=0x07 → cpAppColor[7]=0x24.

§

StatusDisabled

The text of a disabled (greyed-out) status item drawn by StatusLine when the item’s command is absent from the enabled command set. In classic_blue this is darkgray on lightgray (0x78), resolved from cpStatusLine[2]=0x03 → cpAppColor[3]=0x78.

§

StatusSelDisabled

The text of a status item that is simultaneously selected (hovered) and disabled, drawn by StatusLine. In classic_blue this is darkgray on green (0x28), resolved from cpStatusLine[5]=0x06 → cpAppColor[6]=0x28.

§

InfoPane

The file-dialog info pane text — the path, file-size, and date display drawn by FileInfoPane::draw. In classic_blue this is cyan on blue (0x13), resolved from cpInfoPane[1]=0x1E → cpGrayDialog[30]=0x3D → cpAppColor[61]=0x13.

§

OutlineNormal

Style for a normal (non-focused, non-selected) outline row: applied to the graph prefix and the text of an expanded node. Used by ov_draw for every row that is neither focused nor selected.

§

OutlineInactive

An outline’s normal-row background when its owning pane is inactive (see DrawCtx::owner_active), regardless of the outline’s own focus. A tvision-rs deviation (C++ TOutlineViewer has no active/inactive normal): lets splitter-pane layouts dim unfocused trees. In classic_blue it equals OutlineNormal.

§

OutlineSurface

The middle content surface of an Outline: its owning pane is active but a selectable sibling holds focus (the three-surface rule, DrawCtx::content_surface). In classic_blue it equals OutlineNormal, preserving classic per-window uniformity; a theme opts into sibling distinction by giving it the pane-surface colour.

§

OutlineFocused

Style for the focused row of an outline viewer when the viewer has keyboard focus. Applied to both the graph prefix and the node text, regardless of whether the node is expanded or collapsed.

§

OutlineSelected

Style for a selected (highlighted) outline row that does not currently hold focus. Used by outline subclasses that implement multi-selection by overriding OutlineViewer::is_selected.

§

OutlineNotExpanded

Style for the text of a collapsed (not-expanded) node on a normal row. Applies only when the row is neither focused nor selected, making collapsed nodes visually dimmer than expanded ones.

§

Shadow

Window/menu drop shadows — dark gray on black, applied by the shadow pass (DrawCtx::cast_shadow).

Implementations§

Source§

impl Role

Source

pub fn name(self) -> &'static str

Short display name for UI labels (e.g. "FrameActive"). Fits in 16 characters so the theme editor’s list column stays readable.

Trait Implementations§

Source§

impl Clone for Role

Source§

fn clone(&self) -> Role

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Role

Source§

impl Debug for Role

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Role

Source§

impl Hash for Role

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Role

Source§

fn eq(&self, other: &Role) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Role

Auto Trait Implementations§

§

impl Freeze for Role

§

impl RefUnwindSafe for Role

§

impl Send for Role

§

impl Sync for Role

§

impl Unpin for Role

§

impl UnsafeUnpin for Role

§

impl UnwindSafe for Role

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CustomValue for T
where T: Any + Debug,

Source§

fn as_any_rc(self: Rc<T>) -> Rc<dyn Any>

Upcast Rc<Self> to Rc<dyn Any> so FieldValue::as_custom / FieldValue::value_as can downcast.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.