pub struct PacksetClient { /* private fields */ }Expand description
The seat’s pack writer. The token field is private to this module.
Implementations§
Source§impl PacksetClient
impl PacksetClient
pub fn new(base: impl Into<String>) -> Self
Sourcepub fn from_env() -> Result<Self, Error>
pub fn from_env() -> Result<Self, Error>
The writer the seat talks to. PACKSET_URL=off is no pack.
pub fn with_workspace(self, workspace: impl Into<String>) -> Self
pub fn base(&self) -> &str
pub fn workspace(&self) -> String
pub fn health(&self) -> Result<String, Error>
pub fn status(&self, workspace: Option<&str>) -> Result<Value, Error>
pub fn post_atom(&self, atom: &Value) -> Result<Value, Error>
pub fn delete_atom( &self, workspace: &str, id: &str, why: Option<&str>, ) -> Result<Value, Error>
pub fn atoms_of_kind( &self, workspace: &str, kind: &str, ) -> Result<Vec<Value>, Error>
pub fn atoms_in_set( &self, workspace: &str, set: &str, ) -> Result<Vec<Value>, Error>
pub fn sweep(&self, workspace: &str) -> Result<Value, Error>
pub fn grade( &self, workspace: &str, id: &str, recalled: bool, ) -> Result<Value, Error>
pub fn activate_as( &self, workspace: &str, q: &str, limit: u32, fire: bool, lens: Option<&str>, ) -> Result<Value, Error>
pub fn hubs(&self, workspace: &str, limit: usize) -> Result<Value, Error>
pub fn consolidate(&self, workspace: &str, apply: bool) -> Result<Value, Error>
pub fn search_opts( &self, workspace: &str, q: &str, limit: u32, as_of: Option<&str>, rerank: bool, ) -> Result<Vec<Hit>, Error>
pub fn fire(&self, workspace: &str, ids: &[String]) -> Result<Value, Error>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PacksetClient
impl RefUnwindSafe for PacksetClient
impl Send for PacksetClient
impl Sync for PacksetClient
impl Unpin for PacksetClient
impl UnsafeUnpin for PacksetClient
impl UnwindSafe for PacksetClient
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more