tiny.content.Store
Defined in tiny.content.
Holds one Reader and one Sink together for a caller trusted with both authorities.
API (3)
Actions
Public operations.
init: Pairs a Reader with a Sink so a provider can hand out both of its capabilities as one value.
Fields and members
Public fields and members.
Source
Source: lib/content/src/capability.zig:124
zig
/// Holds one Reader and one Sink together for a caller trusted with both/// authorities. Both halves stay reachable as fields, so a caller can still/// hand on one of them alone.pub const Store = struct { reader: Reader, sink: Sink, /// Pairs a Reader with a Sink so a provider can hand out both of its /// capabilities as one value. The function compares the two capacities /// field by field and returns `CapabilityCapacityMismatch` unless they are /// equal, which keeps a reader and a writer from disagreeing about the /// bounds they enforce. pub fn init(reader: Reader, sink: Sink) error{CapabilityCapacityMismatch}!Store { if (!std.meta.eql(reader.capacity, sink.capacity)) { return error.CapabilityCapacityMismatch; } return .{ .reader = reader, .sink = sink }; }};Source: lib/content/src/root.zig:42
zig
pub const Store = capability.Store;Audit
| Definitions | 2 |
|---|---|
| Public names | 2 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |