pub struct Context<'a> {
pub catalog: &'a Catalog,
pub data: &'a UserData,
pub owner: &'a str,
/* private fields */
}Expand description
Everything needed to answer, gathered once rather than per track.
Fields§
§catalog: &'a CatalogThe library.
data: &'a UserDataWhat the user wrote about it.
owner: &'a strWhose opinions count.
Implementations§
Source§impl<'a> Context<'a>
impl<'a> Context<'a>
Sourcepub fn new(
catalog: &'a Catalog,
data: &'a UserData,
owner: &'a str,
) -> Context<'a>
pub fn new( catalog: &'a Catalog, data: &'a UserData, owner: &'a str, ) -> Context<'a>
Creates a query context over local tags and user data.
Sourcepub fn with_sources(self, sources: &Sources) -> Context<'a>
pub fn with_sources(self, sources: &Sources) -> Context<'a>
Adds externally sourced relationships that are certain enough to traverse. Approximate matches remain evidence and never silently become query results.
Auto Trait Implementations§
impl<'a> Freeze for Context<'a>
impl<'a> RefUnwindSafe for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnwindSafe for Context<'a>
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