pub struct LogsQuery { /* private fields */ }
Expand description
Type describing how to fetch logs from spawned process.
Implementations§
Source§impl LogsQuery
impl LogsQuery
Sourcepub fn with_limit(limit: usize) -> Self
pub fn with_limit(limit: usize) -> Self
Fetch logs with given limit. It will retrieve a maximum of limit
logs starting from first one.
§Examples
// assume logs are: [log0, log1, log2, log3, log4]
LogsQuery::with_limit(2); // [log0, log1]
Sourcepub fn with_offset(offset: usize) -> Self
pub fn with_offset(offset: usize) -> Self
Fetch logs with given offset. It will retrieve logs starting from offset
to the last produced log.
§Examples
// assume logs are: [log0, log1, log2, log3, log4]
LogsQuery::with_offset(2); // [log2, log3, log4]
Sourcepub fn with_offset_and_limit(offset: usize, limit: usize) -> Self
pub fn with_offset_and_limit(offset: usize, limit: usize) -> Self
Fetch logs with given offset and limit.
§Examples
// assume logs are: [log0, log1, log2, log3, log4]
LogsQuery::with_offset_and_limit(2, 2); // [log2, log3]
Trait Implementations§
impl Eq for LogsQuery
impl StructuralPartialEq for LogsQuery
Auto Trait Implementations§
impl Freeze for LogsQuery
impl RefUnwindSafe for LogsQuery
impl Send for LogsQuery
impl Sync for LogsQuery
impl Unpin for LogsQuery
impl UnwindSafe for LogsQuery
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