Application Context Implementation #4

Closed
kayomn wants to merge 93 commits from event-loop-dev into main
1 changed files with 8 additions and 2 deletions
Showing only changes of commit ccb96875b1 - Show all commits

View File

@ -98,6 +98,12 @@ pub const FileAccess = struct {
} }
}; };
///
/// Closure that captures a reference to readable resources like block devices, memory buffers,
/// network sockets, and more.
///
pub const Reader = meta.Function(@sizeOf(usize), []u8, usize);
/// ///
/// Returns a state machine for lazily computing all `Element` components of a given source input /// Returns a state machine for lazily computing all `Element` components of a given source input
/// that match a delimiting pattern. /// that match a delimiting pattern.
@ -238,9 +244,9 @@ test "Null writing" {
} }
/// ///
/// Writes the singular `byte` to `writer`, returning `true` if it was successfully written, /// Applies the singular `byte` to `writer`, returning `true` if it was successfully written,
/// otherwise `false`. /// otherwise `false`.
/// ///
pub fn writeByte(writer: Writer, byte: u8) bool { pub fn writeByte(writer: *Writer, byte: u8) bool {
return (writer.apply(std.mem.asBytes(&byte)) != 0); return (writer.apply(std.mem.asBytes(&byte)) != 0);
} }