Enum crypto_screener::modules::message::Msg
source · pub enum Msg {
FetchData,
SetData(Result<Vec<CryptoData>, Error>),
SortBy(String),
ToggleCellSelection(String, String),
ToggleAbout,
}
Expand description
Enum representing messages that can modify the application’s state.
Each variant of Msg
corresponds to a specific action, with associated data
if needed to carry out the operation.
Variants§
FetchData
Initiates a request to fetch cryptocurrency data.
SetData(Result<Vec<CryptoData>, Error>)
Sets the fetched data to the model or stores an error message if the request fails.
Ok(Vec<CryptoData>)
: Successfully retrieved data.Err(reqwest::Error)
: An error occurred during the data fetch.
SortBy(String)
Sorts the data by the specified column.
String
: The name of the column to sort by (e.g., “price_usd”).
ToggleCellSelection(String, String)
Toggles selection state for a specific cell in the data table.
String
: A unique identifier for the row (e.g., a cryptocurrency ID).String
: The name of the column (e.g., “symbol”).
ToggleAbout
Toggles the visibility of the “About” modal.
Auto Trait Implementations§
impl Freeze for Msg
impl !RefUnwindSafe for Msg
impl Send for Msg
impl Sync for Msg
impl Unpin for Msg
impl !UnwindSafe for Msg
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.