pub struct ProstSerializer<J> { /* private fields */ }Expand description
Protobuf serializer for hand-written prost::Message journal types.
The caller supplies both durable protocol identifiers. Existing serializer ids and manifests must remain registered and decodable after schema changes.
Implementations§
Source§impl<J> ProstSerializer<J>
impl<J> ProstSerializer<J>
Sourcepub fn new(serializer_id: SerializerId, manifest: impl Into<String>) -> Self
pub fn new(serializer_id: SerializerId, manifest: impl Into<String>) -> Self
Creates a protobuf serializer with a stable id and manifest.
Trait Implementations§
Source§impl<J> PersistenceSerializer<J> for ProstSerializer<J>
impl<J> PersistenceSerializer<J> for ProstSerializer<J>
Source§fn serializer_id(&self) -> SerializerId
fn serializer_id(&self) -> SerializerId
Returns this serializer’s durable catalog id.
Source§fn manifest(&self, _value: &J) -> String
fn manifest(&self, _value: &J) -> String
Returns the durable type/version hint to store for
value.Source§fn deserialize(&self, _manifest: &str, payload: &[u8]) -> PersistenceResult<J>
fn deserialize(&self, _manifest: &str, payload: &[u8]) -> PersistenceResult<J>
Decodes a journal value using its stored serializer manifest.
Auto Trait Implementations§
impl<J> Freeze for ProstSerializer<J>
impl<J> RefUnwindSafe for ProstSerializer<J>
impl<J> Send for ProstSerializer<J>
impl<J> Sync for ProstSerializer<J>
impl<J> Unpin for ProstSerializer<J>
impl<J> UnsafeUnpin for ProstSerializer<J>
impl<J> UnwindSafe for ProstSerializer<J>
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<S> IntoEventHandlerResult<S> for S
impl<S> IntoEventHandlerResult<S> for S
Source§fn into_event_handler_result(self) -> Result<S, PersistenceError>
fn into_event_handler_result(self) -> Result<S, PersistenceError>
Converts this handler output into the runtime result.
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage