pub struct SearchParamsBuilder { /* private fields */ }Expand description
Typed builder for SearchParams that accepts DateTime<Utc> for date
filters and ensures they’re emitted in RFC 3339 millisecond form.
Implementations§
Source§impl SearchParamsBuilder
impl SearchParamsBuilder
Sourcepub fn context_type(self, t: impl Into<String>) -> Self
pub fn context_type(self, t: impl Into<String>) -> Self
Filter on type.
Filter on tags (comma-separated).
Sourcepub fn derived_from(self, c: impl Into<String>) -> Self
pub fn derived_from(self, c: impl Into<String>) -> Self
Filter to contexts whose derived_from includes this ctx_id.
Sourcepub fn derived_from_ctx_id(self, c: &CtxId) -> Self
pub fn derived_from_ctx_id(self, c: &CtxId) -> Self
Typed alternative to Self::derived_from — accepts a strongly
typed CtxId so callers don’t pass arbitrary strings.
Sourcepub fn tag(self, t: impl Into<String>) -> Self
pub fn tag(self, t: impl Into<String>) -> Self
Accumulate a tag. Multiple calls are joined with , for the
AND-semantics matcher per RFC-ACDP-0005 §2.1.
Sourcepub fn created_after(self, dt: DateTime<Utc>) -> Self
pub fn created_after(self, dt: DateTime<Utc>) -> Self
Lower bound on created_at.
Sourcepub fn created_before(self, dt: DateTime<Utc>) -> Self
pub fn created_before(self, dt: DateTime<Utc>) -> Self
Upper bound on created_at.
Sourcepub fn data_period_start_after(self, dt: DateTime<Utc>) -> Self
pub fn data_period_start_after(self, dt: DateTime<Utc>) -> Self
Lower bound on data_period.start.
Sourcepub fn data_period_end_before(self, dt: DateTime<Utc>) -> Self
pub fn data_period_end_before(self, dt: DateTime<Utc>) -> Self
Upper bound on data_period.end.
Sourcepub fn expires_after(self, dt: DateTime<Utc>) -> Self
pub fn expires_after(self, dt: DateTime<Utc>) -> Self
Lower bound on expires_at.
Sourcepub fn expires_before(self, dt: DateTime<Utc>) -> Self
pub fn expires_before(self, dt: DateTime<Utc>) -> Self
Upper bound on expires_at.
Sourcepub fn build(self) -> SearchParams
pub fn build(self) -> SearchParams
Finalize.
Trait Implementations§
Source§impl Default for SearchParamsBuilder
impl Default for SearchParamsBuilder
Source§fn default() -> SearchParamsBuilder
fn default() -> SearchParamsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SearchParamsBuilder
impl RefUnwindSafe for SearchParamsBuilder
impl Send for SearchParamsBuilder
impl Sync for SearchParamsBuilder
impl Unpin for SearchParamsBuilder
impl UnsafeUnpin for SearchParamsBuilder
impl UnwindSafe for SearchParamsBuilder
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