radn-rs/src/rcore/context.rs
2023-07-06 03:15:00 +00:00

21 lines
585 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 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;
}