pub struct ReadProtocol { /* private fields */ }Implementations§
Source§impl ReadProtocol
impl ReadProtocol
pub fn new(provider: impl Reader) -> Self
pub async fn read<E: Event>( &self, id: impl ToEntityId, seq: i64, ) -> Result<E, ProtocolError>
pub async fn read_to( &self, id: impl ToEntityId, from: i64, to: i64, ) -> Result<BTreeSet<Payload>, ProtocolError>
pub async fn read_to_latest( &self, id: impl ToEntityId, from: i64, ) -> Result<BTreeSet<Payload>, ProtocolError>
Trait Implementations§
Source§impl Clone for ReadProtocol
impl Clone for ReadProtocol
Auto Trait Implementations§
impl Freeze for ReadProtocol
impl !RefUnwindSafe for ReadProtocol
impl Send for ReadProtocol
impl Sync for ReadProtocol
impl Unpin for ReadProtocol
impl !UnwindSafe for ReadProtocol
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