23 lines
712 B
Rust
23 lines
712 B
Rust
use fail::*;
|
|
|
|
use super::*;
|
|
|
|
/// Execution context.
|
|
pub trait Context<'a>: FunctorContext<'a, T = Self::_Tm> {
|
|
/// Type to provide for [Monad]ic representation of computation, mostly that of resolution ([`Resolution`]).
|
|
type _Tm: Monad<'a>;
|
|
|
|
/// Type to allow improved support for result evaluation.
|
|
/// This is important for async applications stopping early.
|
|
type Fallible: MonadFailAny<'a, T = Self::T>;
|
|
|
|
/// See [`Diagnostic`].
|
|
type D: Diagnostic<'a, Self::T>;
|
|
|
|
/// Type to represent resolution errors mainly arising in [`Resolver::resolve`].
|
|
type LookupError: 'a + Error;
|
|
|
|
/// Get [type@Hash] of a slice, mostly for use in [`Point`].
|
|
fn hash(s: &[u8]) -> Hash;
|
|
}
|