[−][src]Module no_proto::pointer
All values in buffers are accessed and modified through pointers
NP_Ptr are the primary abstraction to read, update or delete values in a buffer. Pointers should never be created directly, instead the various methods provided by the library to access the internals of the buffer should be used.
Once you have a pointer you can read it's contents if it's a scalar value with .get()
or convert it to a collection with .deref()
.
When you attempt to read, update, or convert a pointer the schema is checked for that pointer location. If the schema conflicts with the operation you're attempting it will fail.
As a result, you should be careful to make sure your reads and updates to the buffer line up with the schema you provided.
Modules
any | Any type |
bool | NoProto supports Rust's native |
bytes | Represents arbitrary bytes type |
date | Stores the current unix epoch in u64. |
dec | Represents a fixed point decimal number. |
geo | Represents a Geographic Coordinate (lat / lon) |
numbers | NoProto supports a large number of native number types. |
option | Represents the string value of a choice in a schema |
string | NoProto supports Rust's native UTF8 |
ulid | Represents a ULID type which has a 6 byte timestamp and 10 bytes of randomness |
uuid | Represents a V4 UUID, good for globally unique identifiers |
Traits
NP_Scalar | This trait is used to restrict which types can be set/get in the buffer |