pub struct LlmsTxt { /* private fields */ }Expand description
/llms.txt: a site’s summary and links in Markdown, for language models (https://llmstxt.org).
§Examples
use ocre::seo::LlmsTxt;
let txt = LlmsTxt::new("PureFrame", "AI video upscaling, paid per minute.")
.details("Upload a video, get a free preview, then pay to download the full MP4.")
.link("Pages", "Pricing", "https://pureframe.example/pricing", "per-minute prices")
.link("Pages", "FAQ", "https://pureframe.example/faq", "")
.to_string();
assert!(txt.starts_with("# PureFrame\n\n> AI video upscaling, paid per minute.\n\nUpload a video,"));
let pages = "\n## Pages\n\n- [Pricing](https://pureframe.example/pricing): per-minute prices\n- [FAQ](https://pureframe.example/faq)\n";
assert!(txt.ends_with(pages));Implementations§
Trait Implementations§
impl Eq for LlmsTxt
impl StructuralPartialEq for LlmsTxt
Auto Trait Implementations§
impl Freeze for LlmsTxt
impl RefUnwindSafe for LlmsTxt
impl Send for LlmsTxt
impl Sync for LlmsTxt
impl Unpin for LlmsTxt
impl UnsafeUnpin for LlmsTxt
impl UnwindSafe for LlmsTxt
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T, S> Handler<IntoResponseHandler, S> for T
impl<T, S> Handler<IntoResponseHandler, S> for T
§fn call(
self,
_req: Request<Body>,
_state: S,
) -> <T as Handler<IntoResponseHandler, S>>::Future
fn call( self, _req: Request<Body>, _state: S, ) -> <T as Handler<IntoResponseHandler, S>>::Future
Call the handler with the given request.
§fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
Apply a [
tower::Layer] to the handler. Read more§fn with_state(self, state: S) -> HandlerService<Self, T, S>
fn with_state(self, state: S) -> HandlerService<Self, T, S>
Convert the handler into a [
Service] by providing the state§impl<H, T> HandlerWithoutStateExt<T> for Hwhere
H: Handler<T, ()>,
impl<H, T> HandlerWithoutStateExt<T> for Hwhere
H: Handler<T, ()>,
§fn into_service(self) -> HandlerService<H, T, ()>
fn into_service(self) -> HandlerService<H, T, ()>
Convert the handler into a [
Service] and no state.§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
Convert the handler into a
MakeService and no state. Read more