pub struct OperationFilter { /* private fields */ }Expand description
Which operations Client::list_operations should return.
Every filter is optional and they combine; the default asks for everything the cluster is willing to answer with, which is the most recent operations up to its own limit.
use ytsaurus_client::OperationFilter;
let mine = OperationFilter::new()
.with_user("robot-loader")
.with_state("running")
.with_limit(20);Implementations§
Source§impl OperationFilter
impl OperationFilter
Sourcepub fn with_state(self, state: impl AsRef<str>) -> Self
pub fn with_state(self, state: impl AsRef<str>) -> Self
Only operations in this state — running, completed, failed, …
Sourcepub fn with_kind(self, kind: OperationType) -> Self
pub fn with_kind(self, kind: OperationType) -> Self
Only operations of this type.
Sourcepub fn with_pool_tree(self, tree: impl AsRef<str>) -> Self
pub fn with_pool_tree(self, tree: impl AsRef<str>) -> Self
Only operations in this pool tree.
Sourcepub fn with_substring(self, text: impl AsRef<str>) -> Self
pub fn with_substring(self, text: impl AsRef<str>) -> Self
Only operations whose id, alias, user or spec contains this text.
The cluster calls it filter; this is the free-text search the web
interface’s search box sends.
Sourcepub fn with_from_time(self, time: impl AsRef<str>) -> Self
pub fn with_from_time(self, time: impl AsRef<str>) -> Self
Only operations that started at or after this time.
An ISO 8601 timestamp as the cluster writes them —
2026-08-06T09:21:23.534387Z. This crate has no date type and does not
want a dependency on one, so the timestamps go across as text, exactly as
they come back in OperationInfo::start_time.
Sourcepub fn with_to_time(self, time: impl AsRef<str>) -> Self
pub fn with_to_time(self, time: impl AsRef<str>) -> Self
Only operations that started at or before this time.
See OperationFilter::with_from_time for the spelling.
Sourcepub fn with_failed_jobs(self, with_failed_jobs: bool) -> Self
pub fn with_failed_jobs(self, with_failed_jobs: bool) -> Self
Only operations that have failed jobs.
Sourcepub fn with_archive(self, include: bool) -> Self
pub fn with_archive(self, include: bool) -> Self
Also look in the operations archive, not only at what the scheduler still holds.
This is how an operation that finished a while ago is found at all — and it needs an archive, which a local cluster does not have.
Sourcepub fn with_limit(self, limit: u32) -> Self
pub fn with_limit(self, limit: u32) -> Self
At most this many operations.
Trait Implementations§
Source§impl Clone for OperationFilter
impl Clone for OperationFilter
Source§fn clone(&self) -> OperationFilter
fn clone(&self) -> OperationFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more