pub struct TripletPattern {
pub subject: Option<String>,
pub predicate: Option<String>,
pub object: Option<String>,
}Expand description
A pattern for matching facts. None fields act as wildcards.
TripletPattern { subject: Some("Alice"), predicate: None, object: None }
// matches: Alice works_at Google, Alice lives_in Paris, …Fields§
§subject: Option<String>If Some(s), only facts where subject matches s (case-insensitive LIKE) are returned.
predicate: Option<String>If Some(p), only facts where predicate matches p (case-insensitive LIKE) are returned.
object: Option<String>If Some(o), only facts where object matches o (case-insensitive LIKE) are returned.
Implementations§
Source§impl TripletPattern
impl TripletPattern
pub fn with_subject(self, subject: impl Into<String>) -> Self
pub fn with_predicate(self, predicate: impl Into<String>) -> Self
pub fn with_object(self, object: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for TripletPattern
impl Clone for TripletPattern
Source§fn clone(&self) -> TripletPattern
fn clone(&self) -> TripletPattern
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TripletPattern
impl Debug for TripletPattern
Source§impl Default for TripletPattern
impl Default for TripletPattern
Source§fn default() -> TripletPattern
fn default() -> TripletPattern
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TripletPattern
impl RefUnwindSafe for TripletPattern
impl Send for TripletPattern
impl Sync for TripletPattern
impl Unpin for TripletPattern
impl UnsafeUnpin for TripletPattern
impl UnwindSafe for TripletPattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.