Pre: 'Into' implementation chaining TermWithoutTempIds -> TermWithTempIds -> TermWithTempIdsAndLookupRefs
This commit is contained in:
parent
e6066769ca
commit
9a47d8905f
1 changed files with 8 additions and 0 deletions
|
@ -181,6 +181,14 @@ impl TermWithTempIds {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl TermWithoutTempIds {
|
||||||
|
pub(crate) fn rewrap<A, B>(self) -> Term<KnownEntidOr<A>, TypedValueOr<B>> {
|
||||||
|
match self {
|
||||||
|
Term::AddOrRetract(op, n, a, v) => Term::AddOrRetract(op, Left(n), a, Left(v))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Given a `KnownEntidOr` or a `TypedValueOr`, replace any internal `LookupRef` with the entid from
|
/// Given a `KnownEntidOr` or a `TypedValueOr`, replace any internal `LookupRef` with the entid from
|
||||||
/// the given map. Fail if any `LookupRef` cannot be replaced.
|
/// the given map. Fail if any `LookupRef` cannot be replaced.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue