Module tendril::fmt

source · []
Expand description

Marker types for formats.

This module defines the types and traits used to mark a Tendril with the format of data it contains. It includes those formats for which Tendril supports at least some operations without conversion.

To convert a string tendril to/from a byte tendril in an arbitrary character encoding, see the encode and decode methods on Tendril.

Tendril operations may become memory-unsafe if data invalid for the format sneaks in. For that reason, these traits require unsafe impl.

Modules

Implementation details.

Structs

Marker type for ASCII text.

Marker type for uninterpreted bytes.

Marker type for the single-byte encoding of the first 256 Unicode codepoints.

Marker type for UTF-8 text.

Marker type for WTF-8 text.

Traits

Indicates a format which contains characters from Unicode (all of it, or some proper subset).

Trait for format marker types.

Indicates a Rust slice type that is represented in memory as bytes.

Indicates a format which corresponds to a Rust slice type, representing exactly the same invariants.

Indicates that one format is a subset of another.

Functions