Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Dec 17, 2024
1 parent 2877e76 commit 4a3a653
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions components/pattern/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ pub trait PatternBackend: crate::private::Sealed + 'static + core::fmt::Debug {
/// ]
/// );
/// ```
///
/// [`Part`]: writeable::Part
pub trait PlaceholderValueProvider<K> {
type Error;

Expand Down
8 changes: 3 additions & 5 deletions components/pattern/src/frontend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ use writeable::{adapters::TryWriteableInfallibleAsWriteable, PartsWrite, TryWrit
///
/// # Format to Parts
///
/// [`Pattern`] supports interpolating with [writeable::Part]s, annotations for whether the
/// substring was a placeholder or a literal.
///
/// By default, the substrings are annotated with [`PATTERN_LITERAL_PART`] and
/// [`PATTERN_PLACEHOLDER_PART`]. This can be customized with [`PlaceholderValueProvider`].
/// [`Pattern`] propagates [`Part`]s from inner writeables. In addition, it supports annotating
/// [`Part`]s for individual literals or placeholders via the [`PlaceholderValueProvider`] trait.
///
/// # Examples
///
Expand All @@ -65,6 +62,7 @@ use writeable::{adapters::TryWriteableInfallibleAsWriteable, PartsWrite, TryWrit
/// [`SinglePlaceholder`]: crate::SinglePlaceholder
/// [`DoublePlaceholder`]: crate::DoublePlaceholder
/// [`MultiNamedPlaceholder`]: crate::MultiNamedPlaceholder
/// [`Part`]: writeable::Part
#[cfg_attr(feature = "yoke", derive(yoke::Yokeable))]
#[repr(transparent)]
pub struct Pattern<B: PatternBackend> {
Expand Down

0 comments on commit 4a3a653

Please sign in to comment.