trellis_runner/
problem.rs

1#[derive(Debug)]
2pub struct Problem<P>(P);
3
4impl<P> Problem<P> {
5    pub(crate) fn new(inner: P) -> Self {
6        Self(inner)
7    }
8
9    pub fn into_inner(self) -> P {
10        self.0
11    }
12
13    pub fn inner(&self) -> &P {
14        &self.0
15    }
16
17    pub fn inner_mut(&mut self) -> &mut P {
18        &mut self.0
19    }
20}
21
22impl<P> AsRef<P> for Problem<P> {
23    fn as_ref(&self) -> &P {
24        &self.0
25    }
26}
27
28impl<P> AsMut<P> for Problem<P> {
29    fn as_mut(&mut self) -> &mut P {
30        &mut self.0
31    }
32}