pub struct FollowLogsBuilder { /* private fields */ }Expand description
A live log stream being assembled — see Client::follow_logs.
Implementations§
Source§impl FollowLogsBuilder
impl FollowLogsBuilder
Sourcepub fn follow(self, follow: bool) -> Self
pub fn follow(self, follow: bool) -> Self
Keep following after the backlog (default true; false replays and ends).
Sourcepub fn on_data(self, cb: impl FnMut(Vec<u8>) + Send + 'static) -> Self
pub fn on_data(self, cb: impl FnMut(Vec<u8>) + Send + 'static) -> Self
Receive each chunk of log bytes.
Sourcepub fn on_error(self, cb: impl FnMut(Error) + Send + 'static) -> Self
pub fn on_error(self, cb: impl FnMut(Error) + Send + 'static) -> Self
Receive the terminal error, if the stream fails.
Sourcepub fn on_complete(self, cb: impl FnMut() + Send + 'static) -> Self
pub fn on_complete(self, cb: impl FnMut() + Send + 'static) -> Self
Notified when the stream ends cleanly.
Sourcepub fn start(self) -> Result<Subscription>
pub fn start(self) -> Result<Subscription>
Start streaming. Returns the Subscription to stop with.
Auto Trait Implementations§
impl !RefUnwindSafe for FollowLogsBuilder
impl !Sync for FollowLogsBuilder
impl !UnwindSafe for FollowLogsBuilder
impl Freeze for FollowLogsBuilder
impl Send for FollowLogsBuilder
impl Unpin for FollowLogsBuilder
impl UnsafeUnpin for FollowLogsBuilder
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