Text: read-only views of bytes.
Types
Str | Text: len bytes at ptr, in domain 'k, read and never written through. |
StaticRead | Permanent read access to the immutable 'static byte domain. |
Functions
str_byte_at | Byte index of s, or None past its end, read with no capability. |
Instances
ReadBytes[Exclusive!['r], Str['r]] | Text is read through its domain's Exclusive!. |
ReadBytes[Shared!['r, 'q], Str['r]] | Text is read through any node of its domain's shared-read tree. |
ReadBytes[StaticRead, Str['static]] | 'static text is read through StaticRead. |
HashIn[Str['t], C] | Text hashes and compares by its bytes, read through the capability C. |
Methods of other modules' types
Slice::as_str | The bytes the slice views, as text of the same domain. |
Function declarations
fn str_byte_atsource
forall 'k.
unsafe fn str_byte_at(s: Str['k], index: usize) -> Option[u8] { ... }
Byte index of s, or None past its end, read with no capability.
The shared body of the ReadBytes instances. Caller: holds a capability of 'k for the call, since this reads s with none of its own.
Instance declarations
instance ReadBytes[Exclusive!['r], Str['r]]source
forall 'r.
instance ReadBytes[Exclusive!['r], Str['r]] { ... }
Text is read through its domain's Exclusive!.
instance ReadBytes[StaticRead, Str['static]]source
instance ReadBytes[StaticRead, Str['static]] { ... }
'static text is read through StaticRead.
instance HashIn[Str['t], C]source
forall C, 't where ReadBytes[C, Str['t]].
instance HashIn[Str['t], C] { ... }
Text hashes and compares by its bytes, read through the capability C.