fluent_bundle/resolver/
mod.rs1pub mod errors;
7mod expression;
8mod inline_expression;
9mod pattern;
10mod scope;
11
12pub use errors::ResolverError;
13pub use scope::Scope;
14
15use std::borrow::Borrow;
16use std::fmt;
17
18use crate::memoizer::MemoizerKind;
19use crate::resource::FluentResource;
20use crate::types::FluentValue;
21
22pub(crate) trait ResolveValue<'bundle> {
24 fn resolve<'ast, 'args, 'errors, R, M>(
26 &'ast self,
27 scope: &mut Scope<'bundle, 'ast, 'args, 'errors, R, M>,
28 ) -> FluentValue<'bundle>
29 where
30 R: Borrow<FluentResource>,
31 M: MemoizerKind;
32}
33
34pub(crate) trait WriteValue<'bundle> {
36 fn write<'ast, 'args, 'errors, W, R, M>(
38 &'ast self,
39 w: &mut W,
40 scope: &mut Scope<'bundle, 'ast, 'args, 'errors, R, M>,
41 ) -> fmt::Result
42 where
43 W: fmt::Write,
44 R: Borrow<FluentResource>,
45 M: MemoizerKind;
46
47 fn write_error<W>(&self, _w: &mut W) -> fmt::Result
50 where
51 W: fmt::Write;
52}