macro_rules! namespace {
($visibility:vis $name:ident, $bytes: literal) => { ... };
}
Expand description
Construct a storage namespace. It creates a
zero-sized struct with the given type name and
implements Namespace
on it with the provied
byte slice literal.
use fadroma::storage::Namespace;
fadroma::namespace!(MyNamespace, b"ns_bytes");
assert_eq!(MyNamespace::NAMESPACE, b"ns_bytes");