pub struct WindowBind {
pub into: BindTarget,
pub name: String,
pub path: Option<String>,
pub value_type: BindValueType,
pub template: String,
pub format: BindFormat,
}Expand description
Injects a rendered window boundary into the outgoing request — the window
analogue of ReplicationBind. Reuses the same
BindTarget placement and BindFormat formatting.
Fields§
§into: BindTargetWhere to place the rendered boundary (query param / header / body field / path placeholder).
name: StringThe parameter / header / body-field / path-placeholder name. Optional
only for into: body with a path.
path: Option<String>into: body only: an RFC 6901 JSON Pointer into the configured body
(/dateRanges/0/startDate) instead of a top-level name (#748).
value_type: BindValueTypeJSON type written by a body bind: string (default) or number.
template: StringTemplate rendered with WINDOW_PLACEHOLDER (${window}) replaced by the
formatted boundary. Defaults to the bare ${window}; set e.g.
"gte|${window}" or "[${window} TO *]". ${window.start} and
${window.end} render the window’s start and (granularity-adjusted) end
in any bind, so one bind can carry both bounds
("segments.date BETWEEN '${window.start}' AND '${window.end}'"). The
rendered value is not escaped for any query language.
format: BindFormatHow to format the boundary before substitution.
Implementations§
Source§impl WindowBind
impl WindowBind
Sourcepub fn is_unset(&self) -> bool
pub fn is_unset(&self) -> bool
Whether this bind is the unset default (an omitted WindowSpec::upper).
Sourcepub fn validate(&self, side: &str) -> Result<(), FaucetError>
pub fn validate(&self, side: &str) -> Result<(), FaucetError>
Validate the bind at config-load time. side names the field for errors
("lower" / "upper").
Trait Implementations§
Source§impl Clone for WindowBind
impl Clone for WindowBind
Source§impl Debug for WindowBind
impl Debug for WindowBind
Source§impl Default for WindowBind
impl Default for WindowBind
Source§impl<'de> Deserialize<'de> for WindowBind
impl<'de> Deserialize<'de> for WindowBind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for WindowBind
impl JsonSchema for WindowBind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for WindowBind
impl PartialEq for WindowBind
Source§impl Serialize for WindowBind
impl Serialize for WindowBind
impl StructuralPartialEq for WindowBind
Auto Trait Implementations§
impl Freeze for WindowBind
impl RefUnwindSafe for WindowBind
impl Send for WindowBind
impl Sync for WindowBind
impl Unpin for WindowBind
impl UnsafeUnpin for WindowBind
impl UnwindSafe for WindowBind
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request