Skip to content

Commit

Permalink
doc: more doc in lib root
Browse files Browse the repository at this point in the history
  • Loading branch information
polazarus committed Aug 12, 2023
1 parent c9866d0 commit 86a717b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
//! - [`HipStr<B>`](crate::string::HipStr) \
//! a replacement for both `String` and `str`
//!
//! where `B` is a backend among `ThreadSafe` ([`Arc<Vec<u8>>`](std::sync::Arc)) and `Local` ([`Rc<Vec<u8>>`](std::rc::Rc))
//!
//! The crate root provides aliases with `B` fixed to `ThreadSafe`.
//! where `B` is a backend, see below.
//!
//! # Three Representations
//!
Expand All @@ -44,15 +42,25 @@
//! - Inline sequence (up to [`HipByt::inline_capacity()`])
//! - Shared reference (cheaply clonable) _and slice_ (sliceable)
//!
//! The shared reference can be [`Local`] or [`ThreadSafe`].
//! Default aliases in the root of the library use [`ThreadSafe`].
//!
//! The shared reference can be thread-safe or not, depending on the backend.
//!
//! ## ⚠️ Warning!
//!
//! The used representation of the empty string is **unspecified** and may change between patch versions!
//! It may be *borrowed* or *inlined* but will never be allocated.
//!
//! # Two Backends
//!
//! The crate provides two backends:
//!
//! - `ThreadSafe` ([`Arc<Vec<u8>>`](std::sync::Arc)),
//! - `Local` ([`Rc<Vec<u8>>`](std::rc::Rc)).
//!
//! The crate root also provides some convenience type aliases:
//!
//! - `hipstr::HipByt` and `hipstr::HipStr` that set `B` to `ThreadSafe`,
//! - `hipstr::LocalHipByt` and `hipstr::LocalHipStr` that set `B` to `Local`.
//!
//! # Platform Support
//!
//! This crate is only supported on platforms where:
Expand Down

0 comments on commit 86a717b

Please sign in to comment.