Struct leptos_use::UseIntervalReturn
source · pub struct UseIntervalReturn<PauseFn, ResumeFn, ResetFn>{
pub counter: Signal<u64>,
pub reset: ResetFn,
pub is_active: Signal<bool>,
pub pause: PauseFn,
pub resume: ResumeFn,
}
Expand description
Return type of use_interval
.
Fields§
§counter: Signal<u64>
Counter signal that increases by one every interval.
reset: ResetFn
Reset the counter to zero
is_active: Signal<bool>
A Signal that indicates whether the counter is active. false
when paused.
pause: PauseFn
Temporarily pause the counter
resume: ResumeFn
Resume the counter
Implementations§
source§impl<PauseFn, ResumeFn, ResetFn> UseIntervalReturn<PauseFn, ResumeFn, ResetFn>
impl<PauseFn, ResumeFn, ResetFn> UseIntervalReturn<PauseFn, ResumeFn, ResetFn>
sourcepub fn counter(self, value: Signal<u64>) -> Self
pub fn counter(self, value: Signal<u64>) -> Self
Counter signal that increases by one every interval.
sourcepub fn reset<New__ResetFn>(
self,
value: New__ResetFn
) -> UseIntervalReturn<PauseFn, ResumeFn, New__ResetFn>
pub fn reset<New__ResetFn>( self, value: New__ResetFn ) -> UseIntervalReturn<PauseFn, ResumeFn, New__ResetFn>
Reset the counter to zero
sourcepub fn is_active(self, value: Signal<bool>) -> Self
pub fn is_active(self, value: Signal<bool>) -> Self
A Signal that indicates whether the counter is active. false
when paused.
sourcepub fn pause<New__PauseFn>(
self,
value: New__PauseFn
) -> UseIntervalReturn<New__PauseFn, ResumeFn, ResetFn>
pub fn pause<New__PauseFn>( self, value: New__PauseFn ) -> UseIntervalReturn<New__PauseFn, ResumeFn, ResetFn>
Temporarily pause the counter
Auto Trait Implementations§
impl<PauseFn, ResumeFn, ResetFn> Freeze for UseIntervalReturn<PauseFn, ResumeFn, ResetFn>
impl<PauseFn, ResumeFn, ResetFn> !RefUnwindSafe for UseIntervalReturn<PauseFn, ResumeFn, ResetFn>
impl<PauseFn, ResumeFn, ResetFn> !Send for UseIntervalReturn<PauseFn, ResumeFn, ResetFn>
impl<PauseFn, ResumeFn, ResetFn> !Sync for UseIntervalReturn<PauseFn, ResumeFn, ResetFn>
impl<PauseFn, ResumeFn, ResetFn> Unpin for UseIntervalReturn<PauseFn, ResumeFn, ResetFn>
impl<PauseFn, ResumeFn, ResetFn> !UnwindSafe for UseIntervalReturn<PauseFn, ResumeFn, ResetFn>
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
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>
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 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>
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