I have an interface:
public interface IValidator<TIn, TOut>
    where TIn: class
    where TOut: class
{
    IValidator<TIn, TOut> SetNext(IValidator<TIn, TOut> next);
    ValueTask<TOut> ValidateAsync(TIn state);
}
But I need to have an ability to pass in SetNext function IValidator<in TIn, TOut> next do you have some ideas on how it can be achieved?
I've tried
public interface IValidator<**in** TIn, TOut>
    where TIn: class
    where TOut: class
{
    IValidator<TIn, TOut> SetNext(IValidator<TIn, TOut> next);
    ValueTask<TOut> ValidateAsync(TIn state);
}
But it's not doing what I need, it applies to the second method param but not for the interface itself