strid_examples/
wrapper.rs

1//! An example of constructing a basic strongly-typed wrapper around
2//! a string value.
3//!
4//! The types in this module do not perform any validation or normalization
5//! of their values, so every valid UTF-8 string is potentially valid for
6//! these types.
7
8use strid::braid;
9
10/// A basic example of a wrapper around a [`String`]
11///
12/// This type ends in _Buf_, so the borrowed form of this type
13/// will be named [`Username`].
14#[braid(
15    serde,
16    ref_doc = "A borrowed reference to a basic string slice wrapper"
17)]
18pub struct UsernameBuf(String);