pub struct PolarsViewApp {
pub data_container: Option<Arc<DataContainer>>,
pub applied_filter: DataFilter,
pub applied_format: DataFormat,
pub file_info: Option<FileInfo>,
pub notification: Option<Box<dyn Notification>>,
/* private fields */
}Expand description
The main application struct for PolarsView, holding the entire UI and async state.
Fields§
§data_container: Option<Arc<DataContainer>>Holds the currently loaded data and its associated view state (DataContainer).
None if no data is loaded. Arc allows efficient sharing with async tasks.
applied_filter: DataFilterStores the state of the data loading/filtering parameters last applied.
Used by the side panel UI (render_query) to detect changes made by the user
to settings like SQL query, delimiter, etc. Does not contain sort info.
applied_format: DataFormatStores the state of the data formatting settings last applied.
Used by the side panel UI (render_format) to detect changes to display settings.
file_info: Option<FileInfo>Info extracted from the currently loaded file.
notification: Option<Box<dyn Notification>>Optional Notification window for displaying errors or settings dialogs.
Implementations§
Source§impl PolarsViewApp
impl PolarsViewApp
Sourcepub fn new(cc: &CreationContext<'_>) -> PolarsViewResult<Self>
pub fn new(cc: &CreationContext<'_>) -> PolarsViewResult<Self>
Creates a new PolarsViewApp instance.
Sets the initial UI style (theme).
Sourcepub fn new_with_future(
cc: &CreationContext<'_>,
future: DataFuture,
) -> PolarsViewResult<Self>
pub fn new_with_future( cc: &CreationContext<'_>, future: DataFuture, ) -> PolarsViewResult<Self>
Creates a new PolarsViewApp and immediately starts loading data using a provided DataFuture.
Useful for loading data specified via command-line arguments on startup.
future: The asynchronous operation (e.g., DataContainer::load_data) to run.
Trait Implementations§
Source§impl App for PolarsViewApp
impl App for PolarsViewApp
Source§fn update(&mut self, ctx: &Context, _frame: &mut Frame)
fn update(&mut self, ctx: &Context, _frame: &mut Frame)
The main update function called by eframe on each frame (the “render loop”).
Responsible for handling events, updating state, and drawing the UI.
Source§fn save(&mut self, _storage: &mut dyn Storage)
fn save(&mut self, _storage: &mut dyn Storage)
Source§fn on_exit(&mut self, _gl: Option<&Context>)
fn on_exit(&mut self, _gl: Option<&Context>)
Self::save. Read moreSource§fn auto_save_interval(&self) -> Duration
fn auto_save_interval(&self) -> Duration
Self::saveSource§fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
fn clear_color(&self, _visuals: &Visuals) -> [f32; 4]
gl.clearColor. Read moreSource§fn persist_egui_memory(&self) -> bool
fn persist_egui_memory(&self) -> bool
Source§fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)
fn raw_input_hook(&mut self, _ctx: &Context, _raw_input: &mut RawInput)
Self::update. Read moreAuto Trait Implementations§
impl !Freeze for PolarsViewApp
impl !RefUnwindSafe for PolarsViewApp
impl Send for PolarsViewApp
impl Sync for PolarsViewApp
impl Unpin for PolarsViewApp
impl !UnwindSafe for PolarsViewApp
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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