pub struct HaystackServer { /* private fields */ }Expand description
Builder for the Haystack HTTP server.
Implementations§
Source§impl HaystackServer
impl HaystackServer
Sourcepub fn new(graph: SharedGraph) -> Self
pub fn new(graph: SharedGraph) -> Self
Create a new server with the given entity graph.
Sourcepub fn with_namespace(self, ns: DefNamespace) -> Self
pub fn with_namespace(self, ns: DefNamespace) -> Self
Set the ontology namespace for def/spec operations.
Sourcepub fn with_auth(self, auth: AuthManager) -> Self
pub fn with_auth(self, auth: AuthManager) -> Self
Set the authentication manager.
Sourcepub fn with_actions(self, actions: ActionRegistry) -> Self
pub fn with_actions(self, actions: ActionRegistry) -> Self
Set the action registry for the invokeAction op.
Sourcepub fn with_federation(self, federation: Federation) -> Self
pub fn with_federation(self, federation: Federation) -> Self
Set the federation manager for remote connector queries.
Sourcepub fn with_configure<F>(self, f: F) -> Self
pub fn with_configure<F>(self, f: F) -> Self
Register a custom route configuration function.
The function receives a mutable ServiceConfig and can add routes,
scopes, and app data. Called during server startup.
Sourcepub fn with_history_provider(self, provider: Box<dyn HistoryProvider>) -> Self
pub fn with_history_provider(self, provider: Box<dyn HistoryProvider>) -> Self
Set the history storage provider (default: in-memory HisStore).
Auto Trait Implementations§
impl !Freeze for HaystackServer
impl !RefUnwindSafe for HaystackServer
impl Send for HaystackServer
impl Sync for HaystackServer
impl Unpin for HaystackServer
impl UnsafeUnpin for HaystackServer
impl !UnwindSafe for HaystackServer
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> 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