allpass.go 338 B

123456789
  1. package filter
  2. // AllPass is a filter that matches everything and is the same as no filter. It is implemented here as a guard
  3. // against universal operations occurring in the absence of filters.
  4. type AllPass[T any] struct{}
  5. func (n AllPass[T]) String() string { return "(AllPass)" }
  6. func (n AllPass[T]) Matches(T) bool { return true }