Struct leptos_query::QueryResult
source · pub struct QueryResult<V, R>where
V: 'static,
R: RefetchFn,{
pub data: Signal<Option<V>>,
pub state: Signal<QueryState<V>>,
pub is_loading: Signal<bool>,
pub is_fetching: Signal<bool>,
pub is_stale: Signal<bool>,
pub is_invalid: Signal<bool>,
pub refetch: R,
}Expand description
Reactive query result.
Fields§
§data: Signal<Option<V>>The current value of the query. None if it has not been fetched yet.
Should be called inside of a Transition or Suspense component.
state: Signal<QueryState<V>>The current state of the data.
is_loading: Signal<bool>If the query is fetching for the first time.
is_fetching: Signal<bool>If the query is actively fetching.
is_stale: Signal<bool>If the query data is considered stale.
is_invalid: Signal<bool>If the query data has been marked as invalid.
refetch: RRefetch the query.
Trait Implementations§
Auto Trait Implementations§
impl<V, R> !RefUnwindSafe for QueryResult<V, R>
impl<V, R> !Send for QueryResult<V, R>
impl<V, R> !Sync for QueryResult<V, R>
impl<V, R> Unpin for QueryResult<V, R>
impl<V, R> !UnwindSafe for QueryResult<V, R>
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