pub struct PaginatedState<T> {
pub loading: Signal<bool>,
pub items: Signal<Vec<T>>,
pub total: Signal<i64>,
pub error: Signal<Option<String>>,
}Expand description
分页列表加载状态。
各字段是独立 Signal,调用方可按名读取、传给子组件,或对 items 做
with_mut 乐观更新。
Fields§
§loading: Signal<bool>是否正在加载。
items: Signal<Vec<T>>当前页数据。
total: Signal<i64>总条数(用于分页器)。
error: Signal<Option<String>>最近一次加载错误(成功时为 None)。
Auto Trait Implementations§
impl<T> Freeze for PaginatedState<T>
impl<T> !RefUnwindSafe for PaginatedState<T>
impl<T> !Send for PaginatedState<T>
impl<T> !Sync for PaginatedState<T>
impl<T> Unpin for PaginatedState<T>where
T: Unpin,
impl<T> UnsafeUnpin for PaginatedState<T>
impl<T> !UnwindSafe for PaginatedState<T>
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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§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> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.