pub trait ImpliedPredicate<T: ?Sized>: HasAssoc<T, Impls = T> { }Expand description
Helper trait for the implied/entailed bounds trick.
§Usage:
When you have:
// this clause is not entailed
// vvvvvvvv
trait SomeTrait<T : Clone>
where
// And neither is this one.
Self::SomeGat<true> : Send,
{
type SomeGat<const IS_SEND: bool>;
// …
}instead, write:
use ::implied_bounds::ImpliedPredicate;
trait SomeTrait<T>
:
ImpliedPredicate<T, Impls : Clone> +
ImpliedPredicate<Self::SomeGat<true>, Impls : Send> +
{
type SomeGat<const IS_SEND: bool>;
// …
}