pub struct Renderer<E> { /* private fields */ }Expand description
Builds envelopes for one node.
Implementations§
Source§impl<E: Occurrence> Renderer<E>
impl<E: Occurrence> Renderer<E>
pub fn new(source: impl Into<String>, schema_version: u32) -> Self
Sourcepub fn render(
&self,
event: &E,
) -> Result<Envelope<E::Subject, E::Kind>, RenderError>
pub fn render( &self, event: &E, ) -> Result<Envelope<E::Subject, E::Kind>, RenderError>
Renders now, at the moment the occurrence happened.
id and time are stamped together and here rather than at send time: a
queued event describes when it happened, not when delivery got round to
it, and a retry must not look like a second occurrence.
Trait Implementations§
Auto Trait Implementations§
impl<E> Forget for Renderer<E>
impl<E> Freeze for Renderer<E>
impl<E> Move for Renderer<E>
impl<E> RefUnwindSafe for Renderer<E>
impl<E> Send for Renderer<E>
impl<E> Sync for Renderer<E>
impl<E> Unpin for Renderer<E>
impl<E> UnsafeUnpin for Renderer<E>
impl<E> UnwindSafe for Renderer<E>
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