Struct leptos_use::SyncSignalOptions
source · pub struct SyncSignalOptions<L, R> { /* private fields */ }
Expand description
Options for sync_signal_with_options
.
Implementations§
source§impl<L, R> SyncSignalOptions<L, R>
impl<L, R> SyncSignalOptions<L, R>
sourcepub fn immediate(self, value: bool) -> Self
pub fn immediate(self, value: bool) -> Self
If true
, the signals will be immediately synced when this function is called.
If false
, a signal is only updated when the other signal’s value changes.
Defaults to true
.
sourcepub fn direction(self, value: SyncDirection) -> Self
pub fn direction(self, value: SyncDirection) -> Self
Direction of syncing. Defaults to SyncDirection::Both
.
source§impl<L, R> SyncSignalOptions<L, R>
impl<L, R> SyncSignalOptions<L, R>
sourcepub fn transform_ltr(self, transform_ltr: impl Fn(&L) -> R + 'static) -> Self
pub fn transform_ltr(self, transform_ltr: impl Fn(&L) -> R + 'static) -> Self
Transforms the left signal into the right signal. Defaults to identity.
sourcepub fn transform_rtl(self, transform_rtl: impl Fn(&R) -> L + 'static) -> Self
pub fn transform_rtl(self, transform_rtl: impl Fn(&R) -> L + 'static) -> Self
Transforms the right signal into the left signal. Defaults to identity.
sourcepub fn assign_ltr(self, assign_ltr: impl Fn(&mut R, R) + 'static) -> Self
pub fn assign_ltr(self, assign_ltr: impl Fn(&mut R, R) + 'static) -> Self
Assigns the left signal to the right signal.
Defaults to *r = l
.
sourcepub fn assign_rtl(self, assign_rtl: impl Fn(&mut L, L) + 'static) -> Self
pub fn assign_rtl(self, assign_rtl: impl Fn(&mut L, L) + 'static) -> Self
Assigns the right signal to the left signal.
Defaults to *l = r
.
Trait Implementations§
Auto Trait Implementations§
impl<L, R> Freeze for SyncSignalOptions<L, R>
impl<L, R> !RefUnwindSafe for SyncSignalOptions<L, R>
impl<L, R> !Send for SyncSignalOptions<L, R>
impl<L, R> !Sync for SyncSignalOptions<L, R>
impl<L, R> Unpin for SyncSignalOptions<L, R>
impl<L, R> !UnwindSafe for SyncSignalOptions<L, 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
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