Module tendril::fmt [] [src]

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

imp

Implementation details.

Structs

ASCII

Marker type for ASCII text.

Bytes

Marker type for uninterpreted bytes.

Latin1

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

UTF8

Marker type for UTF-8 text.

WTF8

Marker type for WTF-8 text.

Traits

CharFormat

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

Format

Trait for format marker types.

Slice

Indicates a Rust slice type that has a corresponding format.

SliceFormat

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

SubsetOf

Indicates that one format is a subset of another.