pub struct LambdaApp<T, R>{
pub processor: R,
pub static_asset_routes: Vec<StaticAssetRoute>,
/* private fields */
}Expand description
Lambda application with configurable response processing.
The main entry point for creating a Lambda-based HyperChad application.
Combines a custom LambdaResponseProcessor with optional static asset
routing to handle HTTP requests in AWS Lambda environment.
Fields§
§processor: RThe response processor for handling requests.
static_asset_routes: Vec<StaticAssetRoute>Static asset routes (requires assets feature).
Defines routes that serve embedded static files like CSS, JavaScript,
or images. Only available when the assets feature is enabled.
Implementations§
Trait Implementations§
Source§impl<T: HtmlTagRenderer + Clone + Send + Sync> HtmlApp for LambdaApp<PreparedRequest, HtmlLambdaResponseProcessor<T>>
impl<T: HtmlTagRenderer + Clone + Send + Sync> HtmlApp for LambdaApp<PreparedRequest, HtmlLambdaResponseProcessor<T>>
Source§fn tag_renderer(&self) -> &dyn HtmlTagRenderer
fn tag_renderer(&self) -> &dyn HtmlTagRenderer
Source§fn with_responsive_trigger(
self,
name: String,
trigger: ResponsiveTrigger,
) -> Self
fn with_responsive_trigger( self, name: String, trigger: ResponsiveTrigger, ) -> Self
Source§fn add_responsive_trigger(&mut self, name: String, trigger: ResponsiveTrigger)
fn add_responsive_trigger(&mut self, name: String, trigger: ResponsiveTrigger)
Source§fn with_viewport(self, viewport: Option<String>) -> Self
fn with_viewport(self, viewport: Option<String>) -> Self
Source§fn set_viewport(&mut self, viewport: Option<String>)
fn set_viewport(&mut self, viewport: Option<String>)
Source§fn with_title(self, title: Option<String>) -> Self
fn with_title(self, title: Option<String>) -> Self
Source§fn with_description(self, description: Option<String>) -> Self
fn with_description(self, description: Option<String>) -> Self
Source§fn set_description(&mut self, description: Option<String>)
fn set_description(&mut self, description: Option<String>)
Source§fn with_background(self, background: Option<Color>) -> Self
fn with_background(self, background: Option<Color>) -> Self
Source§fn set_background(&mut self, background: Option<Color>)
fn set_background(&mut self, background: Option<Color>)
Source§fn with_html_renderer_event_rx(self, _rx: Receiver<RendererEvent>) -> Self
fn with_html_renderer_event_rx(self, _rx: Receiver<RendererEvent>) -> Self
Source§fn set_html_renderer_event_rx(&mut self, _rx: Receiver<RendererEvent>)
fn set_html_renderer_event_rx(&mut self, _rx: Receiver<RendererEvent>)
Source§fn with_static_asset_routes(
self,
paths: impl Into<Vec<StaticAssetRoute>>,
) -> Self
fn with_static_asset_routes( self, paths: impl Into<Vec<StaticAssetRoute>>, ) -> Self
Source§fn static_asset_routes(&self) -> impl Iterator<Item = &StaticAssetRoute>
fn static_asset_routes(&self) -> impl Iterator<Item = &StaticAssetRoute>
Source§fn with_asset_not_found_behavior(self, _behavior: AssetNotFoundBehavior) -> Self
fn with_asset_not_found_behavior(self, _behavior: AssetNotFoundBehavior) -> Self
Source§fn set_asset_not_found_behavior(&mut self, _behavior: AssetNotFoundBehavior)
fn set_asset_not_found_behavior(&mut self, _behavior: AssetNotFoundBehavior)
Source§fn with_css_url(self, url: impl Into<String>) -> Self
fn with_css_url(self, url: impl Into<String>) -> Self
Source§fn add_css_url(&mut self, url: impl Into<String>)
fn add_css_url(&mut self, url: impl Into<String>)
Source§fn with_css_path(self, path: impl Into<String>) -> Self
fn with_css_path(self, path: impl Into<String>) -> Self
Source§fn add_css_path(&mut self, path: impl Into<String>)
fn add_css_path(&mut self, path: impl Into<String>)
Source§fn with_inline_css(self, css: impl Into<String>) -> Self
fn with_inline_css(self, css: impl Into<String>) -> Self
Source§fn add_inline_css(&mut self, css: impl Into<String>)
fn add_inline_css(&mut self, css: impl Into<String>)
Source§fn inline_css_blocks(&self) -> &[String]
fn inline_css_blocks(&self) -> &[String]
Source§fn with_css_urls(
self,
urls: impl IntoIterator<Item = impl Into<String>>,
) -> Selfwhere
Self: Sized,
fn with_css_urls(
self,
urls: impl IntoIterator<Item = impl Into<String>>,
) -> Selfwhere
Self: Sized,
Source§fn with_css_paths(
self,
paths: impl IntoIterator<Item = impl Into<String>>,
) -> Selfwhere
Self: Sized,
fn with_css_paths(
self,
paths: impl IntoIterator<Item = impl Into<String>>,
) -> Selfwhere
Self: Sized,
Source§fn with_inline_css_blocks(
self,
css_blocks: impl IntoIterator<Item = impl Into<String>>,
) -> Selfwhere
Self: Sized,
fn with_inline_css_blocks(
self,
css_blocks: impl IntoIterator<Item = impl Into<String>>,
) -> Selfwhere
Self: Sized,
Source§impl<T, R> ToRenderRunner for LambdaApp<T, R>
impl<T, R> ToRenderRunner for LambdaApp<T, R>
Source§fn to_runner(
self,
handle: Handle,
) -> Result<Box<dyn RenderRunner>, Box<dyn Error + Send>>
fn to_runner( self, handle: Handle, ) -> Result<Box<dyn RenderRunner>, Box<dyn Error + Send>>
Converts the Lambda application into a runtime-ready runner.
Creates a LambdaAppRunner that wraps this application with the
provided async runtime handle, preparing it for execution in the
Lambda event loop.
§Errors
This implementation always returns Ok and does not produce errors.