File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111//! Pagable implementation for static values.
1212//!
1313//! This module provides [`StaticValue`], a wrapper for `&'static T` that supports
14- //! pagable serialization. Use the [`static_value!`] macro to create and register instances.
14+ //! pagable serialization. Use the [`static_value!`](macro@crate::static_value) macro to create
15+ //! and register instances.
1516//!
1617//! For convenience, type aliases are provided:
1718//! - [`StaticStr`] = `StaticValue<str>`
Original file line number Diff line number Diff line change @@ -122,10 +122,12 @@ macro_rules! register_type_matcher {
122122 } ;
123123}
124124
125- /// Register a frozen type for use with [`StarlarkAnyComplex`].
125+ /// Register a frozen type for use with
126+ /// [`StarlarkAnyComplex`](crate::values::any_complex::StarlarkAnyComplex).
126127///
127128/// This macro:
128- /// 1. Implements [`FrozenAnyComplexRegistered`] for the frozen type
129+ /// 1. Implements [`FrozenAnyComplexRegistered`](crate::values::any_complex::FrozenAnyComplexRegistered)
130+ /// for the frozen type
129131/// 2. Registers the vtable entry for `StarlarkAnyComplex<FrozenType>`
130132///
131133/// # Example
@@ -147,10 +149,11 @@ macro_rules! register_any_complex_frozen {
147149 } ;
148150}
149151
150- /// Register a type for use with [`StarlarkAny`].
152+ /// Register a type for use with [`StarlarkAny`](crate::values::any::StarlarkAny) .
151153///
152154/// This macro:
153- /// 1. Implements [`StarlarkAnyRegistered`] for the type
155+ /// 1. Implements [`StarlarkAnyRegistered`](crate::values::any::StarlarkAnyRegistered) for the
156+ /// type
154157/// 2. Registers the vtable entry for `StarlarkAny<Type>`
155158///
156159/// # Example
Original file line number Diff line number Diff line change @@ -161,7 +161,8 @@ impl<T: Debug + Send + Sync + 'static> StarlarkAny<T> {
161161/// # Safety
162162///
163163/// Implementors must also register the vtable entry for `StarlarkAny<Self>`
164- /// using [`register_simple_vtable_entry!`]. Use the [`register_starlark_any!`]
164+ /// using [`register_simple_vtable_entry!`](macro@crate::register_simple_vtable_entry). Use the
165+ /// [`register_starlark_any!`](macro@crate::register_starlark_any)
165166/// macro instead of implementing this trait manually, as it handles both the trait
166167/// implementation and vtable registration.
167168pub unsafe trait StarlarkAnyRegistered { }
@@ -215,7 +216,7 @@ macro_rules! static_starlark_any {
215216 unsafe impl $crate:: pagable:: static_value:: StaticValueRegistered
216217 for $crate:: values:: types:: any:: StarlarkAny <$T> { }
217218
218- crate :: static_starlark_any!( @no_impl $vis $name : $T = $value) ;
219+ $ crate:: static_starlark_any!( @no_impl $vis $name : $T = $value) ;
219220 } ;
220221
221222 ( @no_impl $vis: vis $name: ident : $T: ty = $value: expr) => {
Original file line number Diff line number Diff line change @@ -128,7 +128,8 @@ where
128128/// # Safety
129129///
130130/// Implementors must also register the vtable entry for `StarlarkAnyComplex<Self>`
131- /// using [`register_simple_vtable_entry!`]. Use the [`register_any_complex_frozen!`]
131+ /// using [`register_simple_vtable_entry!`](macro@crate::register_simple_vtable_entry). Use the
132+ /// [`register_any_complex_frozen!`](macro@crate::register_any_complex_frozen)
132133/// macro instead of implementing this trait manually, as it handles both the trait
133134/// implementation and vtable registration.
134135pub unsafe trait FrozenAnyComplexRegistered { }
You can’t perform that action at this time.
0 commit comments