mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
added a few old deprecated functions to help users port (#2580)
This commit is contained in:
parent
711175a760
commit
986fbe5328
3 changed files with 36 additions and 0 deletions
|
@ -245,3 +245,17 @@ where
|
|||
O: 'static,
|
||||
{
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[track_caller]
|
||||
#[deprecated = "This function is being removed to conform to Rust \
|
||||
idioms.Please use `Action::new()` instead."]
|
||||
pub fn create_action<I, O, F, Fu>(action_fn: F) -> Action<I, O>
|
||||
where
|
||||
I: Send + Sync + 'static,
|
||||
O: Send + Sync + 'static,
|
||||
F: Fn(&I) -> Fu + Send + Sync + 'static,
|
||||
Fu: Future<Output = O> + Send + 'static,
|
||||
{
|
||||
Action::new(action_fn)
|
||||
}
|
||||
|
|
|
@ -110,3 +110,14 @@ impl ToAnySubscriber for Effect {
|
|||
.expect("tried to subscribe to effect that has been stopped")
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[track_caller]
|
||||
#[deprecated = "This function is being removed to conform to Rust \
|
||||
idioms.Please use `Effect::new()` instead."]
|
||||
pub fn create_effect<T>(mut fun: impl FnMut(Option<T>) -> T + 'static) -> Effect
|
||||
where
|
||||
T: 'static,
|
||||
{
|
||||
Effect::new(fun)
|
||||
}
|
||||
|
|
|
@ -258,6 +258,17 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[track_caller]
|
||||
#[deprecated = "This function is being removed to conform to Rust \
|
||||
idioms.Please use `StoredValue::new()` instead."]
|
||||
pub fn store_value<T>(value: T) -> StoredValue<T>
|
||||
where
|
||||
T: Send + Sync + 'static,
|
||||
{
|
||||
StoredValue::new(value)
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub trait StoredData {
|
||||
type Data;
|
||||
|
|
Loading…
Reference in a new issue