diff --git a/reactive_graph/src/effect/effect.rs b/reactive_graph/src/effect/effect.rs index 1b5f322e89..2f33627aae 100644 --- a/reactive_graph/src/effect/effect.rs +++ b/reactive_graph/src/effect/effect.rs @@ -17,6 +17,7 @@ use std::{ }; /// Effects run a certain chunk of code whenever the signals they depend on change. +/// /// Creating an effect runs the given function once after any current synchronous work is done. /// This tracks its reactive values read within it, and reruns the function whenever the value /// of a dependency changes. diff --git a/reactive_graph/src/owner/context.rs b/reactive_graph/src/owner/context.rs index 6ec5fd055b..69e25e8937 100644 --- a/reactive_graph/src/owner/context.rs +++ b/reactive_graph/src/owner/context.rs @@ -168,9 +168,10 @@ pub fn provide_context(value: T) { } } -/// Extracts a context value of type `T` from the reactive system by traversing -/// it upwards, beginning from the current reactive [`Owner`] and iterating -/// through its parents, if any. When the value is found, it is cloned. +/// Extracts a context value of type `T` from the reactive system. +/// +/// This traverses the reactive ownership graph, beginning from the current reactive +/// [`Owner`] and iterating through its parents, if any. When the value is found, it is cloned. /// /// The context value should have been provided elsewhere using /// [`provide_context`](provide_context). @@ -212,9 +213,11 @@ pub fn use_context() -> Option { Owner::current().and_then(|owner| owner.use_context()) } -/// Extracts a context value of type `T` from the reactive system by traversing -/// it upwards, beginning from the current reactive [`Owner`] and iterating -/// through its parents, if any. When the value is found, it is cloned. +/// Extracts a context value of type `T` from the reactive system, and +/// panics if it can't be found. +/// +/// This traverses the reactive ownership graph, beginning from the current reactive +/// [`Owner`] and iterating through its parents, if any. When the value is found, it is cloned. /// /// Panics if no value is found. /// @@ -270,9 +273,11 @@ pub fn expect_context() -> T { }) } -/// Extracts a context value of type `T` from the reactive system by traversing -/// it upwards, beginning from the current reactive [`Owner`] and iterating -/// through its parents, if any. When the value is found, it is removed from the context, +/// Extracts a context value of type `T` from the reactive system, and takes ownership, +/// removing it from the context system. +/// +/// This traverses the reactive ownership graph, beginning from the current reactive +/// [`Owner`] and iterating through its parents, if any. When the value is found, it is removed, /// and is not available to any other [`use_context`] or [`take_context`] calls. /// /// If the value is `Clone`, use [`use_context`] instead. diff --git a/reactive_graph/src/serde.rs b/reactive_graph/src/serde.rs index 50c5846b19..c1b36127c1 100644 --- a/reactive_graph/src/serde.rs +++ b/reactive_graph/src/serde.rs @@ -89,7 +89,6 @@ where } } -#[allow(deprecated)] impl Serialize for MaybeProp where T: Send + Sync + Serialize, diff --git a/reactive_graph/src/wrappers.rs b/reactive_graph/src/wrappers.rs index 3afa54ad18..2c9ae2e21b 100644 --- a/reactive_graph/src/wrappers.rs +++ b/reactive_graph/src/wrappers.rs @@ -1028,7 +1028,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for Option>> where T: Send + Sync + 'static, @@ -1039,7 +1038,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for Option, LocalStorage>> where @@ -1340,9 +1338,10 @@ pub mod read { } } - /// A wrapping type for an optional component prop, which can either be a signal or a - /// non-reactive value, and which may or may not have a value. In other words, this is - /// an `Option>>` that automatically flattens its getters. + /// A wrapping type for an optional component prop. + /// + /// This can either be a signal or a non-reactive value, and may or may not have a value. + /// In other words, this is an `Option>>`, but automatically flattens its getters. /// /// This creates an extremely flexible type for component libraries, etc. /// @@ -1372,7 +1371,6 @@ pub mod read { /// assert_eq!(above_3(&memoized_double_count.into()), true); /// ``` #[derive(Debug, PartialEq, Eq)] - #[allow(deprecated)] pub struct MaybeProp( pub(crate) Option, S>>, ) @@ -1393,7 +1391,6 @@ pub mod read { { } - #[allow(deprecated)] impl Default for MaybeProp where S: Storage> + Storage, S>>, @@ -1403,7 +1400,6 @@ pub mod read { } } - #[allow(deprecated)] impl DefinedAt for MaybeProp where S: Storage> + Storage, S>>, @@ -1414,7 +1410,6 @@ pub mod read { } } - #[allow(deprecated)] impl Track for MaybeProp where S: Storage> + Storage, S>>, @@ -1427,7 +1422,6 @@ pub mod read { } } - #[allow(deprecated)] impl ReadUntracked for MaybeProp where T: Clone, @@ -1450,7 +1444,6 @@ pub mod read { } } - #[allow(deprecated)] impl MaybeProp where T: Send + Sync, @@ -1464,7 +1457,6 @@ pub mod read { } } - #[allow(deprecated)] impl From for MaybeProp where T: Send + Sync, @@ -1475,7 +1467,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for MaybeProp where T: Send + Sync, @@ -1508,7 +1499,6 @@ pub mod read { } } - #[allow(deprecated)] impl From>> for MaybeProp where T: Send + Sync, @@ -1518,7 +1508,6 @@ pub mod read { } } - #[allow(deprecated)] impl From>> for MaybeProp where T: Send + Sync, @@ -1528,7 +1517,6 @@ pub mod read { } } - #[allow(deprecated)] impl From>> for MaybeProp where T: Send + Sync, @@ -1538,7 +1526,6 @@ pub mod read { } } - #[allow(deprecated)] impl From>> for MaybeProp where T: Send + Sync, @@ -1549,7 +1536,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for MaybeProp where T: Send + Sync + Clone, @@ -1559,7 +1545,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for MaybeProp where T: Send + Sync + Clone, @@ -1569,7 +1554,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for MaybeProp where T: Send + Sync + Clone, @@ -1579,7 +1563,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for MaybeProp where T: Send + Sync + Clone, @@ -1589,14 +1572,12 @@ pub mod read { } } - #[allow(deprecated)] impl From<&str> for MaybeProp { fn from(value: &str) -> Self { Self(Some(Signal::from(Some(value.to_string())))) } } - #[allow(deprecated)] impl MaybeProp { /// Wraps a derived signal, i.e., any computation that accesses one or more /// reactive signals. @@ -1607,14 +1588,12 @@ pub mod read { } } - #[allow(deprecated)] impl FromLocal for MaybeProp { fn from_local(value: T) -> Self { Self(Some(Signal::stored_local(Some(value)))) } } - #[allow(deprecated)] impl FromLocal> for MaybeProp { fn from_local(value: Option) -> Self { Self(Some(Signal::stored_local(value))) @@ -1643,7 +1622,6 @@ pub mod read { } } - #[allow(deprecated)] impl From, LocalStorage>> for MaybeProp where T: Send + Sync, @@ -1653,7 +1631,6 @@ pub mod read { } } - #[allow(deprecated)] impl From, LocalStorage>> for MaybeProp where T: Send + Sync, @@ -1663,7 +1640,6 @@ pub mod read { } } - #[allow(deprecated)] impl From, LocalStorage>> for MaybeProp where T: Send + Sync, @@ -1673,14 +1649,12 @@ pub mod read { } } - #[allow(deprecated)] impl From, LocalStorage>> for MaybeProp { fn from(value: Signal, LocalStorage>) -> Self { Self(Some(value)) } } - #[allow(deprecated)] impl From> for MaybeProp where T: Send + Sync + Clone, @@ -1690,7 +1664,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for MaybeProp where T: Send + Sync + Clone, @@ -1700,7 +1673,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for MaybeProp where T: Send + Sync + Clone, @@ -1710,7 +1682,6 @@ pub mod read { } } - #[allow(deprecated)] impl From> for MaybeProp where T: Send + Sync + Clone, @@ -1720,7 +1691,6 @@ pub mod read { } } - #[allow(deprecated)] impl From<&str> for MaybeProp { fn from(value: &str) -> Self { Self(Some(Signal::stored_local(Some(value.to_string()))))