rdf_types/term/
into.rs

1use crate::Term;
2
3/// Type that can be turned into a [`Term`].
4pub trait IntoTerm {
5	/// Node identifier type.
6	type Id;
7
8	/// Literal type.
9	type Literal;
10
11	/// Turns the value into a [`Term`].
12	fn into_term(self) -> Term<Self::Id, Self::Literal>;
13}
14
15impl<I, L> IntoTerm for Term<I, L> {
16	type Id = I;
17
18	type Literal = L;
19
20	fn into_term(self) -> Term<I, L> {
21		self
22	}
23}