Skip to main content

CassApp

Struct CassApp 

Source
pub struct CassApp {
Show 153 fields pub surface: AppSurface, pub view_stack: Vec<AppSurface>, pub analytics_view: AnalyticsView, pub analytics_filters: AnalyticsFilterState, pub analytics_cache: Option<AnalyticsChartData>, pub analytics_selection: usize, pub explorer_metric: ExplorerMetric, pub explorer_overlay: ExplorerOverlay, pub explorer_group_by: GroupBy, pub explorer_zoom: ExplorerZoom, pub breakdown_tab: BreakdownTab, pub heatmap_metric: HeatmapMetric, pub query: String, pub filters: SearchFilters, pub results: Vec<SearchHit>, pub panes: Vec<AgentPane>, pub active_pane: usize, pub pane_scroll_offset: usize, pub per_pane_limit: usize, pub results_list_state: RefCell<VirtualizedListState>, pub wildcard_fallback: bool, pub suggestions: Vec<QuerySuggestion>, pub last_search_ms: Option<u128>, pub search_error_message: Option<String>, pub search_generation: u64, pub search_page_size: usize, pub search_backend_offset: usize, pub search_has_more: bool, pub search_in_flight: bool, pub search_refining: bool, pub search_mode: SearchMode, pub match_mode: MatchMode, pub ranking_mode: RankingMode, pub context_window: ContextWindow, pub time_preset: TimePreset, pub grouping_mode: ResultsGrouping, pub input_mode: InputMode, pub input_buffer: String, pub focus_region: FocusRegion, pub focus_manager: FocusManager, pub cursor_pos: usize, pub history_cursor: Option<usize>, pub query_history: VecDeque<String>, pub pane_filter: Option<String>, pub selected: HashSet<SelectedHitKey>, pub bulk_action_idx: usize, pub open_confirm_armed: bool, pub detail_scroll: u32, pub detail_content_lines: Cell<u32>, pub detail_visible_height: Cell<u32>, pub detail_message_offsets: RefCell<Vec<(u32, MessageRole)>>, pub detail_tab: DetailTab, pub detail_find: Option<DetailFindState>, pub detail_find_matches_cache: RefCell<Vec<u32>>, pub detail_session_hit_lines: Vec<usize>, pub detail_session_hit_offsets_cache: RefCell<Vec<u32>>, pub detail_session_hit_current: usize, pub detail_session_hit_scroll_pending: Cell<bool>, pub detail_pending_scroll_to: Cell<Option<u32>>, pub show_detail_modal: bool, pub modal_scroll: u32, pub cached_detail: Option<(String, ConversationView)>, pub detail_wrap: bool, pub detail_pane_hidden: bool, pub collapsed_tools: HashSet<usize>, pub show_stats_bar: bool, pub theme_dark: bool, pub theme_preset: UiThemePreset, pub style_options: StyleOptions, pub theme_config: Option<ThemeConfig>, pub fancy_borders: bool, pub density_mode: DensityMode, pub peek_window_saved: Option<ContextWindow>, pub show_help: bool, pub help_scroll: u16, pub help_content_lines: Cell<u16>, pub help_visible_height: Cell<u16>, pub help_pinned: bool, pub has_seen_help: bool, pub show_export_modal: bool, pub export_modal_state: Option<ExportModalState>, pub screenshot_pending: Option<ScreenshotFormat>, pub screenshot_result: RefCell<Option<(ScreenshotFormat, String)>>, pub show_bulk_modal: bool, pub show_saved_views_modal: bool, pub saved_views_selection: usize, pub saved_view_drag: Option<SavedViewDragState>, pub saved_view_rename_mode: bool, pub saved_view_rename_buffer: String, pub show_consent_dialog: bool, pub semantic_availability: SemanticAvailability, pub source_filter_menu_open: bool, pub source_filter_menu_selection: usize, pub available_source_ids: Vec<String>, pub palette_state: PaletteState, pub command_palette: CommandPalette, pub palette_match_mode: PaletteMatchMode, pub show_palette_evidence: bool, pub palette_latency: PaletteLatencyStats, pub update_info: Option<UpdateInfo>, pub update_dismissed: bool, pub update_upgrade_armed: bool, pub update_check_rx: Option<Receiver<Option<UpdateInfo>>>, pub toast_manager: ToastManager, pub undo_history: UndoHistory, pub terminal_focused: bool, pub last_terminal_size: Cell<(u16, u16)>, pub anim: AnimationState, pub reveal_anim_start: Option<Instant>, pub focus_flash_until: Option<Instant>, pub peek_badge_until: Option<Instant>, pub last_tick: Instant, pub dirty_since: Option<Instant>, pub search_dirty_since: Option<Instant>, pub spinner_frame: usize, pub saved_views: Vec<SavedView>, pub last_search_bar_area: RefCell<Option<Rect>>, pub last_results_inner: RefCell<Option<Rect>>, pub last_detail_area: RefCell<Option<Rect>>, pub last_pane_rects: RefCell<Vec<Rect>>, pub last_pane_first_index: RefCell<usize>, pub last_pill_rects: RefCell<Vec<(Rect, Pill)>>, pub last_tab_rects: RefCell<Vec<(Rect, AppSurface)>>, pub last_status_area: RefCell<Option<Rect>>, pub last_content_area: RefCell<Option<Rect>>, pub last_split_handle_area: RefCell<Option<Rect>>, pub last_saved_view_row_areas: RefCell<Vec<(Rect, usize)>>, pub last_suggestion_rects: RefCell<Vec<(Rect, usize)>>, pub pane_split_drag: Option<PaneSplitDragState>, pub last_mouse_pos: Option<(u16, u16)>, pub drag_hover_settled_at: Option<Instant>, pub hovered_result: Option<HoveredResult>, pub data_dir: PathBuf, pub db_path: PathBuf, pub db_reader: Option<Arc<FrankenStorage>>, pub known_workspaces: Option<Vec<String>>, pub search_service: Option<Arc<dyn SearchService>>, pub macro_recorder: Option<MacroRecorder>, pub macro_playback: Option<MacroPlayback>, pub macro_redact_paths: bool, pub show_inspector: bool, pub inspector_tab: InspectorTab, pub inspector_state: InspectorState, pub frame_timing: FrameTimingStats, pub evidence: EvidenceSnapshots, pub cockpit: CockpitState, pub sources_view: SourcesViewState, pub swarm_cockpit: SwarmCockpitState, pub doctor_hud_summary: Option<DoctorHudSummary>, pub status: String, pub index_refresh_in_flight: bool, pub indexing_progress: Option<Arc<IndexingProgress>>, pub indeterminate_progress_phase: f64, /* private fields */
}
Expand description

Top-level application state for the cass TUI.

Implements ftui::Model in the runtime skeleton (bead 2noh9.2.3). Every field here is the single source of truth; rendering and event handling derive all behavior from this struct.

Fields§

§surface: AppSurface

Top-level surface (Search or Analytics).

§view_stack: Vec<AppSurface>

Navigation back-stack (Esc pops, drilldowns push).

§analytics_view: AnalyticsView

Current analytics subview.

§analytics_filters: AnalyticsFilterState

Analytics-specific filter state.

§analytics_cache: Option<AnalyticsChartData>

Cached analytics chart data (loaded when entering analytics surface).

§analytics_selection: usize

Current selection index within the active analytics subview (for drilldown).

§explorer_metric: ExplorerMetric

Explorer metric selector state.

§explorer_overlay: ExplorerOverlay

Explorer overlay mode.

§explorer_group_by: GroupBy

Explorer time-bucket granularity (Hour / Day / Week / Month).

§explorer_zoom: ExplorerZoom

Explorer zoom preset (All / 24h / 7d / 30d / 90d).

§breakdown_tab: BreakdownTab

Active tab within the Breakdowns view.

§heatmap_metric: HeatmapMetric

Active metric for the Heatmap view.

§query: String

Current search query text.

§filters: SearchFilters

Active search filters (agents, workspaces, time range, source).

§results: Vec<SearchHit>

Last search results (flat list, before pane grouping).

§panes: Vec<AgentPane>

Results grouped into per-agent panes.

§active_pane: usize

Currently active pane index.

§pane_scroll_offset: usize

Scroll offset within the pane list.

§per_pane_limit: usize

Items shown per pane. 0 means unlimited.

§results_list_state: RefCell<VirtualizedListState>

Virtualized list state for the active results pane (RefCell for view-time mutation).

§wildcard_fallback: bool

Whether wildcard fallback was triggered for the current query.

§suggestions: Vec<QuerySuggestion>

Did-you-mean / filter suggestions for the current query.

§last_search_ms: Option<u128>

Elapsed time of the last search (for latency badge).

§search_error_message: Option<String>

Error from the most recent failed search for the current settled query.

§search_generation: u64

Monotonic generation id for the current query so stale async results can be ignored.

§search_page_size: usize

TUI page size for incremental search loading (infinite scroll).

§search_backend_offset: usize

Backend offset for incremental search paging.

This tracks how many raw hits have been consumed from the backend’s ordering. It must be used for offset when requesting more results, because the UI may deduplicate hits before display.

§search_has_more: bool

Whether the current query likely has more results beyond results.

§search_in_flight: bool

Guard against overlapping async search requests (initial or load-more).

§search_refining: bool

True after initial live results arrive but refinement is still streaming.

§search_mode: SearchMode

Which search mode is active (lexical / semantic / hybrid).

§match_mode: MatchMode

Text matching strategy.

§ranking_mode: RankingMode

Result ordering strategy.

§context_window: ContextWindow

Context window size.

§time_preset: TimePreset

Active time filter preset (for Shift+F5 cycling).

§grouping_mode: ResultsGrouping

How results are grouped into panes.

§input_mode: InputMode

What the user is currently typing into.

§input_buffer: String

Ephemeral input buffer for filter prompts.

§focus_region: FocusRegion

Which pane region has keyboard focus (legacy compat).

§focus_manager: FocusManager

FocusGraph-based navigation manager.

§cursor_pos: usize

Cursor position within the query string (byte offset).

§history_cursor: Option<usize>

Cursor position within query history.

§query_history: VecDeque<String>

Past query strings (most recent first), deduplicated.

§pane_filter: Option<String>

Local pane filter text (/ key in results).

§selected: HashSet<SelectedHitKey>

Stable hit IDs for multi-selected items.

§bulk_action_idx: usize

Cursor index in the bulk-actions modal menu.

§open_confirm_armed: bool

Two-press safety flag: armed after first Ctrl+O when >= threshold items.

§detail_scroll: u32

Scroll position in the detail pane.

§detail_content_lines: Cell<u32>

Total content lines in the detail pane (set during render).

§detail_visible_height: Cell<u32>

Visible height of the detail pane viewport (set during render).

§detail_message_offsets: RefCell<Vec<(u32, MessageRole)>>

Line offsets of each message header in the Messages tab (set during render). Each entry is (line_offset, role) for message-level navigation.

§detail_tab: DetailTab

Active tab in the detail pane.

§detail_find: Option<DetailFindState>

Inline find state within the detail pane.

§detail_find_matches_cache: RefCell<Vec<u32>>

Cache for find-in-detail match line numbers (written during rendering).

§detail_session_hit_lines: Vec<usize>

Message line numbers (1-indexed) for search hits in the active session. Used to highlight context and drive hit-to-hit navigation in detail modal.

§detail_session_hit_offsets_cache: RefCell<Vec<u32>>

Rendered line offsets for session hits in the Messages tab.

§detail_session_hit_current: usize

Active index in detail_session_hit_lines.

§detail_session_hit_scroll_pending: Cell<bool>

When true, the next Messages render will schedule an auto-scroll to detail_session_hit_current.

§detail_pending_scroll_to: Cell<Option<u32>>

Pending scroll target computed during render, applied on the next Tick.

§show_detail_modal: bool

Whether the detail drill-in modal is open.

§modal_scroll: u32

Scroll position within the detail modal.

§cached_detail: Option<(String, ConversationView)>

Cached conversation for the currently selected result.

§detail_wrap: bool

Whether word-wrap is enabled in the detail pane.

§detail_pane_hidden: bool

Whether the detail preview pane is hidden (maximise results area).

§collapsed_tools: HashSet<usize>

Indices of tool/system messages that are collapsed in the detail modal. When a message index is in this set its content is hidden behind a one-line summary bar; pressing Enter/Space toggles it.

§show_stats_bar: bool

Whether the aggregate stats bar is visible at the bottom of results pane.

§theme_dark: bool

Whether dark theme is active.

§theme_preset: UiThemePreset

Active ftui theme preset.

§style_options: StyleOptions

Runtime style options derived from environment + user toggles.

§theme_config: Option<ThemeConfig>

Persisted theme config loaded from data_dir/theme.json (if present).

§fancy_borders: bool

Whether fancy (rounded) borders are enabled.

§density_mode: DensityMode

Visual density mode.

§peek_window_saved: Option<ContextWindow>

Saved context window before peek-XL override.

§show_help: bool

Whether the help overlay is visible.

§help_scroll: u16

Scroll position within the help overlay.

§help_content_lines: Cell<u16>

Total content lines in the help overlay (set during render).

§help_visible_height: Cell<u16>

Visible height of the help overlay viewport (set during render).

§help_pinned: bool

Whether the help strip is pinned.

§has_seen_help: bool

Whether help has been shown at least once for this profile.

§show_export_modal: bool

Whether the export modal is visible.

§export_modal_state: Option<ExportModalState>

State of the export modal form.

§screenshot_pending: Option<ScreenshotFormat>

Pending screenshot capture (set in update, consumed in view).

§screenshot_result: RefCell<Option<(ScreenshotFormat, String)>>

Buffer for screenshot data captured during view() (RefCell for &self access).

§show_bulk_modal: bool

Whether the bulk actions modal is visible.

§show_saved_views_modal: bool

Whether the saved views manager modal is visible.

§saved_views_selection: usize

Current selected index inside saved views manager.

§saved_view_drag: Option<SavedViewDragState>

Active drag state while reordering saved views with the mouse.

§saved_view_rename_mode: bool

Whether the saved views manager is currently renaming a slot.

§saved_view_rename_buffer: String

Rename buffer used while editing saved view labels.

§show_consent_dialog: bool

Whether the consent dialog (model download) is visible.

§semantic_availability: SemanticAvailability

Semantic search availability state.

§source_filter_menu_open: bool

Whether the source filter popup menu is open.

§source_filter_menu_selection: usize

Current selection index in the source filter menu.

§available_source_ids: Vec<String>

Discovered source IDs shown in the source filter menu.

§palette_state: PaletteState

Command palette state (action registry and legacy open flag).

§command_palette: CommandPalette

ftui CommandPalette widget (rendering, filtering, selection, scoring).

§palette_match_mode: PaletteMatchMode

Current palette match-filter mode (All / Exact / Prefix / WordStart / Substring / Fuzzy).

§show_palette_evidence: bool

Whether the palette evidence ledger panel is visible.

§palette_latency: PaletteLatencyStats

Palette query latency instrumentation.

§update_info: Option<UpdateInfo>

Latest update check result (if any).

§update_dismissed: bool

Session-only dismissal toggle for update banner.

§update_upgrade_armed: bool

Two-step guard: first upgrade request arms, second confirms.

§update_check_rx: Option<Receiver<Option<UpdateInfo>>>

One-shot update-check receiver started at app initialization.

§toast_manager: ToastManager

Toast notification manager.

§undo_history: UndoHistory

History stack for query/filter state undo/redo (Ctrl+Z / Ctrl+Y).

§terminal_focused: bool

Whether the terminal window has focus (for dim-on-blur).

§last_terminal_size: Cell<(u16, u16)>

Last known terminal size (width, height) for macro metadata and fallbacks.

§anim: AnimationState

Spring-based animation state (focus flash, reveal, modal, panel).

§reveal_anim_start: Option<Instant>

Start time of the reveal animation (legacy, kept for tui.rs compat).

§focus_flash_until: Option<Instant>

End time of the focus-flash indicator (legacy, kept for tui.rs compat).

§peek_badge_until: Option<Instant>

End time of the peek badge indicator (legacy, kept for tui.rs compat).

§last_tick: Instant

Last tick timestamp for animation frame delta.

§dirty_since: Option<Instant>

When state became dirty (for debounced persistence).

§search_dirty_since: Option<Instant>

When query/filters changed (for debounced search, 60ms).

§spinner_frame: usize

Current spinner frame index.

§saved_views: Vec<SavedView>

Up to 9 saved filter+ranking presets (Ctrl+1..9).

§last_search_bar_area: RefCell<Option<Rect>>

Last rendered search bar area.

§last_results_inner: RefCell<Option<Rect>>

Last rendered results inner area (without borders).

§last_detail_area: RefCell<Option<Rect>>

Last rendered detail area rectangle.

§last_pane_rects: RefCell<Vec<Rect>>

Last rendered pane rectangles.

§last_pane_first_index: RefCell<usize>

First pane index represented by last_pane_rects.

§last_pill_rects: RefCell<Vec<(Rect, Pill)>>

Last rendered pill hit-test rectangles.

§last_tab_rects: RefCell<Vec<(Rect, AppSurface)>>

Last rendered surface tab hit-test rectangles (shell strip).

§last_status_area: RefCell<Option<Rect>>

Last rendered status footer area.

§last_content_area: RefCell<Option<Rect>>

Last rendered content area (results/detail container).

§last_split_handle_area: RefCell<Option<Rect>>

Last rendered pane split handle hit area.

§last_saved_view_row_areas: RefCell<Vec<(Rect, usize)>>

Last rendered saved-view list row hit areas.

§last_suggestion_rects: RefCell<Vec<(Rect, usize)>>

Last rendered suggestion hit areas (Did-you-mean).

§pane_split_drag: Option<PaneSplitDragState>

Active pane split drag state for mouse-based resize.

§last_mouse_pos: Option<(u16, u16)>

Last mouse position for jitter detection (suppresses sub-threshold drag noise).

§drag_hover_settled_at: Option<Instant>

Timestamp of last saved-view drag hover change (for stabilization).

§hovered_result: Option<HoveredResult>

Result row currently under the mouse cursor (pane-aware hover highlight).

§data_dir: PathBuf

Data directory used for runtime state/index operations.

§db_path: PathBuf

SQLite database path used for indexing/search operations.

§db_reader: Option<Arc<FrankenStorage>>

Database reader (initialized on first use).

§known_workspaces: Option<Vec<String>>

Known workspace list (populated on first filter prompt).

§search_service: Option<Arc<dyn SearchService>>

Search service for async query dispatch.

§macro_recorder: Option<MacroRecorder>

Active macro recorder (when interactive recording is in progress).

§macro_playback: Option<MacroPlayback>

Active macro playback scheduler (when replaying a macro).

§macro_redact_paths: bool

Whether to redact absolute paths when saving macros.

§show_inspector: bool

Whether the inspector overlay is visible.

§inspector_tab: InspectorTab

Active inspector tab (Timing / Layout / HitRegions).

§inspector_state: InspectorState

ftui inspector widget state (mode cycling, hit regions).

§frame_timing: FrameTimingStats

Rolling frame timing statistics.

§evidence: EvidenceSnapshots

Latest runtime evidence snapshots for explainability cockpit.

§cockpit: CockpitState

Cockpit data contracts aggregated from evidence snapshots.

§sources_view: SourcesViewState

Sources management view state.

§swarm_cockpit: SwarmCockpitState

Cached swarm operations cockpit view state. Rendering never refreshes it.

§doctor_hud_summary: Option<DoctorHudSummary>

Cached doctor v2 state shown in the footer. Rendering never refreshes it.

§status: String

Footer status text.

§index_refresh_in_flight: bool

Guard against overlapping index-refresh tasks.

§indexing_progress: Option<Arc<IndexingProgress>>

Shared progress handle for the background indexer (set during refresh).

§indeterminate_progress_phase: f64

Phase accumulator for indeterminate (ping-pong) progress bars.

Implementations§

Source§

impl CassApp

Source

pub fn focused_region(&self) -> FocusRegion

Derive the legacy FocusRegion from the current FocusManager state.

This bridges the new graph-based focus system with existing code that checks focus_region for rendering decisions.

Trait Implementations§

Source§

impl Default for CassApp

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Model for CassApp

Source§

type Message = CassMsg

The message type for this model. Read more
Source§

fn init(&mut self) -> Cmd<CassMsg>

Initialize the model with startup commands. Read more
Source§

fn subscriptions(&self) -> Vec<Box<dyn Subscription<Self::Message>>>

Declare active subscriptions. Read more
Source§

fn update(&mut self, msg: CassMsg) -> Cmd<CassMsg>

Update the model in response to a message. Read more
Source§

fn view(&self, frame: &mut Frame<'_>)

Render the current state to a frame. Read more
Source§

fn as_screen_tick_dispatch(&mut self) -> Option<&mut dyn ScreenTickDispatch>

Downcast to ScreenTickDispatch for per-screen tick control. Read more
Source§

fn on_shutdown(&mut self) -> Cmd<Self::Message>

Called before the runtime exits, whether via Cmd::Quit or signal. Read more
Source§

fn on_error(&mut self, _error: &str) -> Cmd<Self::Message>

Called when an unrecoverable error occurs during the runtime loop. Read more

Auto Trait Implementations§

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> Downcast for T
where T: Any,

Source§

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

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

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

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

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

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

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

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

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

Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, _span: NoopSpan) -> Self

Instruments this future with a span (no-op when disabled).
Source§

fn in_current_span(self) -> Self

Instruments this future with the current span (no-op when disabled).
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more