struct Match [src]

Fields

basename: []const u8Relative to the watched directory, the file path that triggers this match.
step: *StepThe step to re-run when file corresponding to basename is changed.

Members

Source

pub const Match = struct { /// Relative to the watched directory, the file path that triggers this /// match. basename: []const u8, /// The step to re-run when file corresponding to `basename` is changed. step: *Step, pub const Context = struct { pub fn hash(self: Context, a: Match) u32 { _ = self; var hasher = Hash.init(0); std.hash.autoHash(&hasher, a.step); hasher.update(a.basename); return @truncate(hasher.final()); } pub fn eql(self: Context, a: Match, b: Match, b_index: usize) bool { _ = self; _ = b_index; return a.step == b.step and std.mem.eql(u8, a.basename, b.basename); } }; }