pub trait Triple<S, P, O>:
Debug
+ Clone
+ Display{
// Required methods
fn new(subj: impl Into<S>, pred: impl Into<P>, obj: impl Into<O>) -> Self;
fn subj(&self) -> S;
fn pred(&self) -> P;
fn obj(&self) -> O;
fn into_components(self) -> (S, P, O);
// Provided methods
fn into_subject(self) -> S { ... }
fn into_predicate(self) -> P { ... }
fn into_object(self) -> O { ... }
}
Required Methods§
fn new(subj: impl Into<S>, pred: impl Into<P>, obj: impl Into<O>) -> Self
fn subj(&self) -> S
fn pred(&self) -> P
fn obj(&self) -> O
fn into_components(self) -> (S, P, O)
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.