Expand description
§Cap’n Proto Runtime Library
This crate contains basic facilities for reading and writing Cap’n Proto messages in Rust. It is intended to be used in conjunction with code generated by the capnpc-rust crate.
Modules§
- Untyped pointer that can be cast to any struct, list, or capability type.
- List of AnyPointers.
- Hooks for the RPC system.
- List of capabilities.
- Helper type for generated Struct and List constants.
- Sequence of bytes.
- List of sequences of bytes.
- Dynamically-typed lists.
- Dynamically-typed structs.
- Dynamically typed values.
- List of enums.
- Traits and types to support run-time type introspection, i.e. reflection.
- Custom I/O traits that roughly mirror
std::io::{Read, BufRead, Write}
. This extra layer of indirection enables support of no-std environments. - List of lists.
- Untyped root container for a Cap’n Proto value.
- List of primitives.
- Implementation details that should never be directly used by clients.
- Functions providing low level access to encoded data.
- Convenience wrappers of the datatypes defined in schema.capnp.
- Code generated from schema.capnp.
- Reading and writing of messages using the standard stream framing.
- Reading and writing of messages using the packed stream encoding.
- List of structs.
- UTF-8 encoded text.
- List of strings containing UTF-8 encoded text.
Structs§
- Describes an arbitrary error that prevented an operation from completing.
- Size of a message. Every generated struct has a method
.total_size()
that returns this. - An enum value or union discriminant that was not found among those defined in a schema.
- 8 bytes, aligned to an 8-byte boundary.
Enums§
- The general nature of an error. The purpose of this enum is not to describe the error itself, but rather to describe how the client might want to respond to the error.
- Helper struct that allows
MessageBuilder::get_segments_for_output()
to avoid heap allocations in the single-segment case.
Functions§
- Constructs a word with the given bytes.
Type Aliases§
- Because messages are lazily validated, the return type of any method that reads a pointer field must be wrapped in a Result.