grass_runtime/record/
mod.rs1mod bed3;
2mod bed4;
3mod bed5;
4mod bed6;
5
6pub use bed3::Bed3;
7pub use bed4::{Bed4, RcCowString};
8pub use bed5::Bed5;
9pub use bed6::Bed6;
10
11pub trait ToSelfContained {
12 type SelfContained: 'static;
13 fn to_self_contained(&self) -> Self::SelfContained;
14}
15
16impl<A: ToSelfContained, B: ToSelfContained> ToSelfContained for (A, B) {
17 type SelfContained = (A::SelfContained, B::SelfContained);
18 fn to_self_contained(&self) -> Self::SelfContained {
19 (self.0.to_self_contained(), self.1.to_self_contained())
20 }
21}
22
23impl<T: ToSelfContained> ToSelfContained for Option<T> {
24 type SelfContained = Option<T::SelfContained>;
25 fn to_self_contained(&self) -> Self::SelfContained {
26 self.as_ref().map(T::to_self_contained)
27 }
28}