pub struct FilterCursor { /* private fields */ }Expand description
FilterCursor is a cursor that returns all logs optionally filtered by component selectors.
Implementations§
Source§impl FilterCursor
impl FilterCursor
pub fn new( buffer: Arc<SharedBuffer>, index: u64, message_id: u64, snapshot: bool, selectors: Vec<ComponentSelector>, ) -> Self
Sourcepub fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Message<'_>>>
pub fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Message<'_>>>
Polls for the next message. We can’t use the Stream trait because this is a lending iterator; it returns a reference to a message (and will hold a lock). Depending on the use, this can be more efficient than using a Stream which will involve copying the message.
Trait Implementations§
Source§impl<T> From<FilterCursor> for FilterCursorStream<T>
impl<T> From<FilterCursor> for FilterCursorStream<T>
Source§fn from(cursor: FilterCursor) -> Self
fn from(cursor: FilterCursor) -> Self
Converts to this type from the input type.
impl<'pin> Unpin for FilterCursorwhere
PinnedFieldsOf<__FilterCursor<'pin>>: Unpin,
Auto Trait Implementations§
impl Freeze for FilterCursor
impl !RefUnwindSafe for FilterCursor
impl Send for FilterCursor
impl !Sync for FilterCursor
impl !UnwindSafe for FilterCursor
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [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 more