pub struct MessageCardEngine { /* private fields */ }Expand description
Entry point for migrating MessageCard payloads to the Adaptive pipeline.
Implementations§
Source§impl MessageCardEngine
impl MessageCardEngine
pub fn new(renderer_registry: RendererRegistry) -> Self
Sourcepub fn bootstrap() -> Self
pub fn bootstrap() -> Self
Builds an engine with an empty renderer registry. Individual renderers are expected to be registered by the caller.
pub fn with_telemetry<T: TelemetryHook + 'static>(self, hook: T) -> Self
pub fn registry(&self) -> &RendererRegistry
pub fn register_renderer<R>(&mut self, renderer: R)where
R: PlatformRenderer + 'static,
Sourcepub fn normalize(&self, card: &MessageCard) -> Result<MessageCardIr>
pub fn normalize(&self, card: &MessageCard) -> Result<MessageCardIr>
Converts user-authored MessageCards into the internal IR.
Sourcepub fn render_spec(&self, card: &MessageCard) -> Result<RenderSpec>
pub fn render_spec(&self, card: &MessageCard) -> Result<RenderSpec>
Produces a normalized render specification for downstream renderers.
pub fn render(&self, platform: &str, ir: &MessageCardIr) -> Option<Value>
pub fn render_spec_payload( &self, platform: &str, spec: &RenderSpec, ) -> Option<Value>
pub fn render_snapshot_tracked( &self, platform: &str, spec: &RenderSpec, ) -> Option<RenderSnapshot>
pub fn render_snapshot( &self, platform: &str, spec: &RenderSpec, ) -> Option<RenderSnapshot>
pub fn render_card_snapshot( &self, platform: &str, ir: &MessageCardIr, ) -> Option<RenderSnapshot>
pub fn downgrade(&self, ir: &MessageCardIr, target_tier: Tier) -> MessageCardIr
pub fn downgrade_for_platform( &self, ir: &MessageCardIr, platform: &str, target_tier: Tier, ) -> MessageCardIr
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MessageCardEngine
impl !RefUnwindSafe for MessageCardEngine
impl Send for MessageCardEngine
impl Sync for MessageCardEngine
impl Unpin for MessageCardEngine
impl !UnwindSafe for MessageCardEngine
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request