aliri_braid_examples 0.1.10

Examples demonstrating usage of the `aliri_braid` crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! An example of constructing a basic strongly-typed wrapper around
//! a string value.
//!
//! The types in this module do not perform any validation or normalization
//! of their values, so every valid UTF-8 string is potentially valid for
//! these types.

use aliri_braid::braid;

/// A basic example of a wrapper around a [`String`]
///
/// This type ends in _Buf_, so the borrowed form of this type
/// will be named [`Username`].
#[braid(
    serde,
    ref_doc = "A borrowed reference to a basic string slice wrapper"
)]
pub struct UsernameBuf;