pub struct Federation { /* private fields */ }Expand description
Manages multiple remote connectors for federated queries.
Implementations§
Source§impl Federation
impl Federation
Sourcepub fn add(&mut self, config: ConnectorConfig)
pub fn add(&mut self, config: ConnectorConfig)
Add a connector for a remote Haystack server.
Sourcepub async fn sync_all(&self) -> Vec<(String, Result<usize, String>)>
pub async fn sync_all(&self) -> Vec<(String, Result<usize, String>)>
Sync all connectors, returning a vec of (name, result) pairs.
Each result is either Ok(count) with the number of entities synced,
or Err(message) with the error description.
Sourcepub fn all_cached_entities(&self) -> Vec<HDict>
pub fn all_cached_entities(&self) -> Vec<HDict>
Returns all cached entities from all connectors, merged into a single vec.
Sourcepub fn connector_count(&self) -> usize
pub fn connector_count(&self) -> usize
Returns the number of connectors.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Federation
impl !RefUnwindSafe for Federation
impl Send for Federation
impl Sync for Federation
impl Unpin for Federation
impl UnsafeUnpin for Federation
impl UnwindSafe for Federation
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