Module ascii

Source

Macrosยง

ascii_alu ๐Ÿ”’
ascii_naive ๐Ÿ”’
ascii_simd_check_align ๐Ÿ”’
ascii_simd_check_align_unrolled ๐Ÿ”’
ascii_simd_unalign ๐Ÿ”’
ascii_to_ascii_simd_double_stride ๐Ÿ”’
ascii_to_ascii_simd_stride ๐Ÿ”’
ascii_to_basic_latin_simd_double_stride ๐Ÿ”’
ascii_to_basic_latin_simd_stride ๐Ÿ”’
basic_latin_alu ๐Ÿ”’
basic_latin_to_ascii_simd_stride ๐Ÿ”’
latin1_alu ๐Ÿ”’
latin1_simd_check_align ๐Ÿ”’
latin1_simd_check_align_unrolled ๐Ÿ”’
latin1_simd_unalign ๐Ÿ”’
pack_simd_stride ๐Ÿ”’
unpack_simd_stride ๐Ÿ”’

Constantsยง

ALU_ALIGNMENT
ALU_ALIGNMENT_MASK
ALU_STRIDE_SIZE
Safety invariant: this is the amount of bytes consumed by unpack_alu. This will be twice the pointer width, as it consumes two usizes. This is also the number of bytes produced by pack_alu. This is also the number of u16 code units produced/consumed by unpack_alu/pack_alu respectively.
ASCII_MASK
BASIC_LATIN_MASK
MAX_STRIDE_SIZE

Functionsยง

ascii_to_asciiโš 
Safety: src and dst must have len elements, src is valid for read, dst is valid for write Safety-usable invariant: will return Some() when it fails to convert. The first value will be a u8 that is > 127.
ascii_to_ascii_stride ๐Ÿ”’ โš 
ascii_to_basic_latinโš 
Safety: src and dst must have len elements, src is valid for read, dst is valid for write Safety-usable invariant: will return Some() when it fails to convert. The first value will be a u8 that is > 127.
ascii_to_basic_latin_stride_alu ๐Ÿ”’ โš 
ascii_valid_up_to
basic_latin_to_asciiโš 
Safety: src and dst must have len elements, src is valid for read, dst is valid for write Safety-usable invariant: will return Some() when it fails to convert. The first value will be a u8 that is > 127.
basic_latin_to_ascii_stride_alu ๐Ÿ”’ โš 
count_zeros ๐Ÿ”’
find_non_ascii ๐Ÿ”’
iso_2022_jp_ascii_valid_up_to
likely ๐Ÿ”’
pack_alu ๐Ÿ”’ โš 
Safety: dst must point to valid space for writing two usizes
pack_latin1โš 
Safety: src and dst must have len elements, src is valid for read, dst is valid for write
pack_latin1_stride_alu ๐Ÿ”’ โš 
unlikely ๐Ÿ”’
unpack_alu ๐Ÿ”’ โš 
Safety: dst must point to valid space for writing four usizes
unpack_latin1โš 
Safety: src and dst must have len elements, src is valid for read, dst is valid for write
unpack_latin1_stride_alu ๐Ÿ”’ โš 
validate_ascii
Safety-usable invariant: will return Some() when it encounters non-ASCII, with the first element in the Some being guaranteed to be non-ASCII (> 127), and the second being the offset where it is found
validate_ascii_stride ๐Ÿ”’ โš 
Safety: src must be valid for the reads of two usizes