pub struct LemmaBase { /* private fields */ }Expand description
The LemmaBase registry fetches Lemma source text from LemmaBase.
This is the default registry for the Lemma engine. It resolves @... identifiers
via GET {base}/{name}.lemma (name includes the leading @). The base depends on compile profile:
LemmaBase::BASE_URL (http://localhost:4222 in debug builds,
https://lemmabase.com in release builds).
LemmaBase.com returns the requested spec with all of its dependencies inlined, so the resolution loop typically completes in a single iteration.
This struct is only available when the registry feature is enabled (which it is
by default). Users who require strict sandboxing (no network access) can compile
without this feature.
Implementations§
Source§impl LemmaBase
impl LemmaBase
Trait Implementations§
Source§impl Registry for LemmaBase
impl Registry for LemmaBase
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<RegistryBundle, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<RegistryBundle, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch all temporal versions for a repository identifier. Read more
Source§fn url_for_id(
&self,
name: &str,
effective: Option<&DateTimeValue>,
) -> Option<String>
fn url_for_id( &self, name: &str, effective: Option<&DateTimeValue>, ) -> Option<String>
Map a repository identifier to a human-facing address for navigation. Read more
Auto Trait Implementations§
impl Freeze for LemmaBase
impl !RefUnwindSafe for LemmaBase
impl Send for LemmaBase
impl Sync for LemmaBase
impl Unpin for LemmaBase
impl UnsafeUnpin for LemmaBase
impl !UnwindSafe for LemmaBase
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