From ee56bc47f84a88275939665a1e07dc2ced824f53 Mon Sep 17 00:00:00 2001 From: arctic-hen7 Date: Sun, 8 Jan 2023 09:38:38 +1100 Subject: [PATCH] fix(docs): fixed broken docs links --- packages/perseus/src/lib.rs | 2 +- packages/perseus/src/reactor/mod.rs | 2 +- packages/perseus/src/state/rx_collections/mod.rs | 2 +- .../perseus/src/state/rx_collections/rx_hash_map.rs | 2 +- .../src/state/rx_collections/rx_hash_map_nested.rs | 12 ++++++------ packages/perseus/src/state/rx_collections/rx_vec.rs | 2 +- .../src/state/rx_collections/rx_vec_nested.rs | 2 +- packages/perseus/src/template/core/setters.rs | 2 +- packages/perseus/src/template/fn_types.rs | 2 +- packages/perseus/src/template/mod.rs | 2 +- packages/perseus/src/translator/fluent.rs | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/perseus/src/lib.rs b/packages/perseus/src/lib.rs index ea7316cea8..c725872dff 100644 --- a/packages/perseus/src/lib.rs +++ b/packages/perseus/src/lib.rs @@ -44,7 +44,7 @@ pub mod server; /// Utilities for working with Perseus' state platform. pub mod state; /// Utilities for working with immutable and mutable stores. See -/// [`ImmutableStore`] and [`MutableStore`] for details. +/// [`stores::ImmutableStore`] and [`stores::MutableStore`] for details. pub mod stores; /// Utilities for working with templates and state generation. This is by far /// the module you'll probably access the most. diff --git a/packages/perseus/src/reactor/mod.rs b/packages/perseus/src/reactor/mod.rs index bdcc246917..3cae0c99f9 100644 --- a/packages/perseus/src/reactor/mod.rs +++ b/packages/perseus/src/reactor/mod.rs @@ -127,7 +127,7 @@ pub struct Reactor { #[cfg(engine)] pub(crate) render_mode: RenderMode, /// The currently active translator. On the browser-side, this is handled by - /// the more fully-fledged [`ClientTranslationsManager`]. + /// the more fully-fledged `ClientTranslationsManager` type. /// /// This is provided to the engine-side reactor on instantiation. This can /// be `None` in certain error view renders. diff --git a/packages/perseus/src/state/rx_collections/mod.rs b/packages/perseus/src/state/rx_collections/mod.rs index 96ccad4ec3..1b6e4ed02a 100644 --- a/packages/perseus/src/state/rx_collections/mod.rs +++ b/packages/perseus/src/state/rx_collections/mod.rs @@ -31,7 +31,7 @@ //! Finally, every file in this module follows the same code pattern, allowing //! maximal extensibility and self-documentation: //! -//! ``` +//! ```text //! // --- Type definitions --- //! // ... //! // --- Reactivity implementations --- diff --git a/packages/perseus/src/state/rx_collections/rx_hash_map.rs b/packages/perseus/src/state/rx_collections/rx_hash_map.rs index 8b71083b00..84fa186d58 100644 --- a/packages/perseus/src/state/rx_collections/rx_hash_map.rs +++ b/packages/perseus/src/state/rx_collections/rx_hash_map.rs @@ -11,7 +11,7 @@ use sycamore::reactive::{create_rc_signal, RcSignal}; /// This requires nothing by `Clone + 'static` of the elements inside the map, /// and it wraps them in `RcSignal`s to make them reactive. If you want to store /// nested reactive types inside the map (e.g. `String`s), you should -/// use [`RxVecNested`]. +/// use [`super::RxHashMapNested`]. #[derive(Serialize, Deserialize, Clone, Debug)] pub struct RxHashMap(HashMap) where diff --git a/packages/perseus/src/state/rx_collections/rx_hash_map_nested.rs b/packages/perseus/src/state/rx_collections/rx_hash_map_nested.rs index e8890c0504..209d9a80eb 100644 --- a/packages/perseus/src/state/rx_collections/rx_hash_map_nested.rs +++ b/packages/perseus/src/state/rx_collections/rx_hash_map_nested.rs @@ -6,11 +6,11 @@ use std::ops::Deref; #[cfg(client)] use sycamore::prelude::Scope; -/// A reactive version of [`Vec`] that uses nested reactivity on its elements. -/// That means the type inside the vector must implement [`MakeRx`] (usually -/// derived with the `ReactiveState` macro). If you want to store simple types -/// inside the vector, without nested reactivity (e.g. `String`s), you should -/// use [`RxVec`]. +/// A reactive version of [`HashMap`] that uses nested reactivity on its +/// elements. That means the type inside the vector must implement [`MakeRx`] +/// (usually derived with the `ReactiveState` macro). If you want to store +/// simple types inside the vector, without nested reactivity (e.g. `String`s), +/// you should use [`super::RxHashMap`]. #[derive(Serialize, Deserialize, Clone, Debug)] pub struct RxHashMapNested(HashMap) where @@ -19,7 +19,7 @@ where // including the actual bounds here V: MakeRx + 'static, V::Rx: MakeUnrx + Freeze + Clone; -/// The reactive version of [`RxHashMap`]. +/// The reactive version of [`RxHashMapNested`]. #[derive(Clone, Debug)] pub struct RxHashMapNestedRx(HashMap) where diff --git a/packages/perseus/src/state/rx_collections/rx_vec.rs b/packages/perseus/src/state/rx_collections/rx_vec.rs index d25ebd7d28..28aba64a49 100644 --- a/packages/perseus/src/state/rx_collections/rx_vec.rs +++ b/packages/perseus/src/state/rx_collections/rx_vec.rs @@ -9,7 +9,7 @@ use sycamore::reactive::{create_rc_signal, RcSignal}; /// This requires nothing by `Clone + 'static` of the elements inside the /// vector, and it wraps them in `RcSignal`s to make them reactive. If you want /// to store nested reactive types inside the vector (e.g. `String`s), you -/// should use [`RxVecNested`]. +/// should use [`super::RxVecNested`]. #[derive(Serialize, Deserialize, Clone, Debug)] pub struct RxVec(Vec) where diff --git a/packages/perseus/src/state/rx_collections/rx_vec_nested.rs b/packages/perseus/src/state/rx_collections/rx_vec_nested.rs index d742e4daad..e4d4fc8ea7 100644 --- a/packages/perseus/src/state/rx_collections/rx_vec_nested.rs +++ b/packages/perseus/src/state/rx_collections/rx_vec_nested.rs @@ -8,7 +8,7 @@ use sycamore::prelude::Scope; /// That means the type inside the vector must implement [`MakeRx`] (usually /// derived with the `ReactiveState` macro). If you want to store simple types /// inside the vector, without nested reactivity (e.g. `String`s), you should -/// use [`RxVec`]. +/// use [`super::RxVec`]. #[derive(Serialize, Deserialize, Clone, Debug)] pub struct RxVecNested(Vec) where diff --git a/packages/perseus/src/template/core/setters.rs b/packages/perseus/src/template/core/setters.rs index 0abf9e3890..c702601c70 100644 --- a/packages/perseus/src/template/core/setters.rs +++ b/packages/perseus/src/template/core/setters.rs @@ -261,7 +261,7 @@ impl TemplateInner { /// and request time. The function you provide here is responsible for /// rationalizing the two into one single state to be sent to the client, /// and this will be run just after the request state function - /// completes. See [`States`] for further details. + /// completes. #[cfg(engine)] pub fn amalgamate_states_fn( mut self, diff --git a/packages/perseus/src/template/fn_types.rs b/packages/perseus/src/template/fn_types.rs index b4c5a7d982..53ceeb2f38 100644 --- a/packages/perseus/src/template/fn_types.rs +++ b/packages/perseus/src/template/fn_types.rs @@ -56,7 +56,7 @@ impl GeneratorResult { } } } -/// The same as [`GeneratorResult`], except this uses a [`GenericBlamedError`] +/// The same as [`GeneratorResult`], except this uses a `GenericBlamedError` /// as its error type, which is essentially a `Box`ed generic error with an /// attached [`ErrorBlame`] denoting who is responsible for the error: the /// client or the server. You'll see this as a convertion type in the signatures diff --git a/packages/perseus/src/template/mod.rs b/packages/perseus/src/template/mod.rs index 86c2b89974..9972258e40 100644 --- a/packages/perseus/src/template/mod.rs +++ b/packages/perseus/src/template/mod.rs @@ -17,7 +17,7 @@ pub use fn_types::*; /* There are a lot of render function traits in here, there pub(crate) use default_headers::default_headers; // pub use render_ctx::RenderCtx; // pub(crate) use render_ctx::{RenderMode, RenderStatus}; -pub use capsule::Capsule; +pub use capsule::{Capsule, CapsuleInner}; #[cfg(engine)] pub(crate) use states::States; diff --git a/packages/perseus/src/translator/fluent.rs b/packages/perseus/src/translator/fluent.rs index 0cdac0b5d4..f8d3fc907b 100644 --- a/packages/perseus/src/translator/fluent.rs +++ b/packages/perseus/src/translator/fluent.rs @@ -11,7 +11,7 @@ pub const FLUENT_TRANSLATOR_FILE_EXT: &str = "ftl"; /// Manages translations on the client-side for a single locale using Mozilla's [Fluent](https://projectfluent.org/) syntax. /// This is safely `Clone`able, and is provided through Sycamore's context /// system to every template in your app automatically. Usually, you will -/// use this only through the [`t!`] and [`link!`] macros. +/// use this only through the [`crate::t!`] and [`crate::link!`] macros. /// /// Fluent supports compound messages, with many variants, which can specified /// here using the form `[id].[variant]` in a translation ID, as a `.` is not