Skip to main content

OracleUi

Struct OracleUi 

Source
pub struct OracleUi<'a> { /* private fields */ }
Expand description

Main Oracle UI widget — data and builder; rendering is delegated to block modules.

Implementations§

Source§

impl<'a> OracleUi<'a>

Source

pub fn new(theme: &'a Theme) -> Self

Source

pub fn items(self, items: &'a [AnalyzedItem]) -> Self

Source

pub fn all_items_impl_lookup(self, items: Option<&'a [AnalyzedItem]>) -> Self

Source

pub fn filtered_items(self, items: &'a [&'a AnalyzedItem]) -> Self

Source

pub fn selected_installed_crate( self, crate_info: Option<&'a InstalledCrate>, ) -> Self

Source

pub fn installed_crate_items(self, items: &'a [&'a AnalyzedItem]) -> Self

Source

pub fn target_size_bytes(self, bytes: Option<u64>) -> Self

Source

pub fn list_selected(self, selected: Option<usize>) -> Self

Source

pub fn candidates(self, candidates: &'a [CompletionCandidate]) -> Self

Source

pub fn crate_info(self, info: Option<&'a CrateInfo>) -> Self

Source

pub fn dependency_tree(self, tree: &'a [(String, usize)]) -> Self

Source

pub fn filtered_dependency_indices(self, indices: &'a [usize]) -> Self

Source

pub fn crate_doc(self, doc: Option<&'a CrateDocInfo>) -> Self

Source

pub fn crate_doc_loading(self, loading: bool) -> Self

Source

pub fn crate_doc_failed(self, failed: bool) -> Self

Source

pub fn search_input(self, input: &'a str) -> Self

Source

pub fn current_tab(self, tab: Tab) -> Self

Source

pub fn focus(self, focus: Focus) -> Self

Source

pub fn selected_item(self, item: Option<&'a AnalyzedItem>) -> Self

Source

pub fn completion_selected(self, index: usize) -> Self

Source

pub fn show_completion(self, show: bool) -> Self

Source

pub fn show_help(self, show: bool) -> Self

Source

pub fn show_settings(self, show: bool) -> Self

Source

pub fn status_message(self, msg: &'a str) -> Self

Source

pub fn inspector_scroll(self, scroll: usize) -> Self

Source

pub fn animation_state(self, animation: &'a AnimationState) -> Self

Source

pub fn show_copilot_chat(self, show: bool) -> Self

Source

pub fn copilot_chat_messages(self, messages: &'a [(String, String)]) -> Self

Source

pub fn copilot_chat_input(self, input: &'a str) -> Self

Source

pub fn copilot_chat_loading(self, loading: bool) -> Self

Source

pub fn copilot_chat_scroll(self, scroll: usize) -> Self

Trait Implementations§

Source§

impl Widget for OracleUi<'_>

Source§

fn render(self, area: Rect, buf: &mut Buffer)

Draws the current state of the widget in the given buffer. That is the only method required to implement a custom widget.

Auto Trait Implementations§

§

impl<'a> Freeze for OracleUi<'a>

§

impl<'a> RefUnwindSafe for OracleUi<'a>

§

impl<'a> Send for OracleUi<'a>

§

impl<'a> Sync for OracleUi<'a>

§

impl<'a> Unpin for OracleUi<'a>

§

impl<'a> UnwindSafe for OracleUi<'a>

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> 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, 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. 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.
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