StdlibText and data
encoding
Two small, self-contained, dependency-free codecs. Both exist because net::ws needs them for the WebSocket handshake; both are useful on their own.
public module encoding::base64;
public module encoding::sha1;
| File | What it holds | Import |
|---|---|---|
base64 | encode, decode — RFC 4648 | import std::encoding::base64; |
sha1 | sha1 — RFC 3174 | import std::encoding::sha1; |
public function name() { ... }
public:Visible to any module that imports this one - the default for top-level items and for struct fields, so it is mostly written to be explicit. public: opens a visibility block that groups the members after it.
public module collections::array;In a directory's _module.cryo aggregator, lists a submodule and whether it is public. Importing the directory's namespace sees only the modules declared public here.
import a::b;
import a::b::{ X, Y };
import a::b as c;
import a::b::*;Brings a module, or selected items from it, into scope. One path per declaration: use the brace form for several items, as to alias, and * for everything public (prefer the brace form; wildcards invite name collisions).