Skip to main content

Module tokenize

Module tokenize 

Source
Expand description

Break a string into a set of directory-object Items.

This module defines Item, which represents a basic entry in a directory document, and NetDocReader, which is used to break a string into Items.

Modulesยง

object ๐Ÿ”’
Useful constants for netdoc object syntax

Structsยง

Item ๐Ÿ”’
A single part of a directory object.
MaybeItem ๐Ÿ”’
Represents an Item that might not be present, whose arguments we want to inspect. If the Item is there, this acts like a proxy to the item; otherwise, it treats the item as having no arguments.
NetDocReader ๐Ÿ”’
A peekable cursor into a string that returns Items one by one.
NetDocReaderBase ๐Ÿ”’
A cursor into a string that returns Items one by one.
Object ๐Ÿ”’
A tagged object that is part of a directory Item.

Traitsยง

ItemResult ๐Ÿ”’
Extension trait for Result<Item> โ€“ makes it convenient to implement PauseAt predicates

Functionsยง

b64check ๐Ÿ”’
Check that all the characters in s are valid base64.
base64_decode_multiline ๐Ÿ”’
Helper: as base64::decode(), but allows newlines in the middle of the encoded object.
is_sp ๐Ÿ”’
Return true iff a given character is โ€œspaceโ€ according to the rules of dir-spec.txt
keyword_ok ๐Ÿ”’
Return true iff โ€˜sโ€™ is a valid keyword or annotation.
tag_keywords_ok ๐Ÿ”’
Return true iff โ€˜sโ€™ is a valid keywords string for a BEGIN/END tag.
validate_utf_8_rules ๐Ÿ”’
Check additional UTF-8 rules that the netdoc metaformat imposes on our documents.