diff options
Diffstat (limited to 'core/tape.zig')
| -rw-r--r-- | core/tape.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/tape.zig b/core/tape.zig index d977b53e..f705636f 100644 --- a/core/tape.zig +++ b/core/tape.zig @@ -135,6 +135,9 @@ pub const Site = enum(u16) { /// join (panes.reloadTerminals), which every replica's own reload /// compares. reload, + /// A kitty image's medium as a terminal's emulator read it (a file, a + /// temporary file, shared memory: Term.media), its bytes or its failure. + medium, }; /// What the sites return. wire.semantics hashes their shape with the @@ -1296,6 +1299,12 @@ pub fn authority(comptime f: anytype, args: anytype) @typeInfo(@TypeOf(f)).@"fn" return (on orelse &none).authority(f, args); } +/// `value` whose answer's slices are `a`'s on a replay, as `site`'s are: +/// what its caller keeps (a kitty image's medium, Term.media). +pub fn valueIn(comptime s: Site, a: std.mem.Allocator, comptime f: anytype, args: anytype) @typeInfo(@TypeOf(f)).@"fn".return_type.? { + return (on orelse &none).call(s, a, f, args, false); +} + /// What `authority` was asked: `f` and its arguments as they are. fn question(comptime f: anytype, args: anytype) u64 { var h = std.hash.Wyhash.init(@intFromPtr(&f)); |
