pub struct ReadKeyRequestBuilder<'a, S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<'a, S: State> ReadKeyRequestBuilder<'a, S>
impl<'a, S: State> ReadKeyRequestBuilder<'a, S>
Sourcepub fn build(self) -> ReadKeyRequest<'a>where
S: IsComplete,
pub fn build(self) -> ReadKeyRequest<'a>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn key(self, value: &'a str) -> ReadKeyRequestBuilder<'a, SetKey<S>>where
S::Key: IsUnset,
pub fn key(self, value: &'a str) -> ReadKeyRequestBuilder<'a, SetKey<S>>where
S::Key: IsUnset,
Required.
Specifies the path of the key to read.
Sourcepub fn namespace(
self,
value: &'a str,
) -> ReadKeyRequestBuilder<'a, SetNamespace<S>>where
S::Namespace: IsUnset,
pub fn namespace(
self,
value: &'a str,
) -> ReadKeyRequestBuilder<'a, SetNamespace<S>>where
S::Namespace: IsUnset,
Optional (Some / Option setters).
Default: <&'a str as Default>::default().
Specifies the namespace to query. If not provided, the namespace will be inferred from the request’s ACL token, or will default to the default namespace. For recursive lookups, the namespace may be specified as ‘*’ and then results will be returned for all namespaces. Added in Consul 1.7.0.
Sourcepub fn maybe_namespace(
self,
value: Option<&'a str>,
) -> ReadKeyRequestBuilder<'a, SetNamespace<S>>where
S::Namespace: IsUnset,
pub fn maybe_namespace(
self,
value: Option<&'a str>,
) -> ReadKeyRequestBuilder<'a, SetNamespace<S>>where
S::Namespace: IsUnset,
Optional (Some / Option setters).
Default: <&'a str as Default>::default().
Specifies the namespace to query. If not provided, the namespace will be inferred from the request’s ACL token, or will default to the default namespace. For recursive lookups, the namespace may be specified as ‘*’ and then results will be returned for all namespaces. Added in Consul 1.7.0.
Sourcepub fn datacenter(
self,
value: &'a str,
) -> ReadKeyRequestBuilder<'a, SetDatacenter<S>>where
S::Datacenter: IsUnset,
pub fn datacenter(
self,
value: &'a str,
) -> ReadKeyRequestBuilder<'a, SetDatacenter<S>>where
S::Datacenter: IsUnset,
Sourcepub fn maybe_datacenter(
self,
value: Option<&'a str>,
) -> ReadKeyRequestBuilder<'a, SetDatacenter<S>>where
S::Datacenter: IsUnset,
pub fn maybe_datacenter(
self,
value: Option<&'a str>,
) -> ReadKeyRequestBuilder<'a, SetDatacenter<S>>where
S::Datacenter: IsUnset,
Sourcepub fn recurse(self, value: bool) -> ReadKeyRequestBuilder<'a, SetRecurse<S>>where
S::Recurse: IsUnset,
pub fn recurse(self, value: bool) -> ReadKeyRequestBuilder<'a, SetRecurse<S>>where
S::Recurse: IsUnset,
Sourcepub fn maybe_recurse(
self,
value: Option<bool>,
) -> ReadKeyRequestBuilder<'a, SetRecurse<S>>where
S::Recurse: IsUnset,
pub fn maybe_recurse(
self,
value: Option<bool>,
) -> ReadKeyRequestBuilder<'a, SetRecurse<S>>where
S::Recurse: IsUnset,
Sourcepub fn separator(
self,
value: &'a str,
) -> ReadKeyRequestBuilder<'a, SetSeparator<S>>where
S::Separator: IsUnset,
pub fn separator(
self,
value: &'a str,
) -> ReadKeyRequestBuilder<'a, SetSeparator<S>>where
S::Separator: IsUnset,
Sourcepub fn maybe_separator(
self,
value: Option<&'a str>,
) -> ReadKeyRequestBuilder<'a, SetSeparator<S>>where
S::Separator: IsUnset,
pub fn maybe_separator(
self,
value: Option<&'a str>,
) -> ReadKeyRequestBuilder<'a, SetSeparator<S>>where
S::Separator: IsUnset,
Sourcepub fn consistency(
self,
value: ConsistencyMode,
) -> ReadKeyRequestBuilder<'a, SetConsistency<S>>where
S::Consistency: IsUnset,
pub fn consistency(
self,
value: ConsistencyMode,
) -> ReadKeyRequestBuilder<'a, SetConsistency<S>>where
S::Consistency: IsUnset,
Optional (Some / Option setters).
Default: <ConsistencyMode as Default>::default().
The consistency mode for reads. See also ConsistencyMode
Sourcepub fn maybe_consistency(
self,
value: Option<ConsistencyMode>,
) -> ReadKeyRequestBuilder<'a, SetConsistency<S>>where
S::Consistency: IsUnset,
pub fn maybe_consistency(
self,
value: Option<ConsistencyMode>,
) -> ReadKeyRequestBuilder<'a, SetConsistency<S>>where
S::Consistency: IsUnset,
Optional (Some / Option setters).
Default: <ConsistencyMode as Default>::default().
The consistency mode for reads. See also ConsistencyMode
Sourcepub fn index(self, value: u64) -> ReadKeyRequestBuilder<'a, SetIndex<S>>where
S::Index: IsUnset,
pub fn index(self, value: u64) -> ReadKeyRequestBuilder<'a, SetIndex<S>>where
S::Index: IsUnset,
Optional (Some / Option setters). Endpoints that support blocking queries return an HTTP header named X-Consul-Index. This is a unique identifier representing the current state of the requested resource. On subsequent requests for this resource, the client can set the index query string parameter to the value of X-Consul-Index, indicating that the client wishes to wait for any changes subsequent to that index.
Sourcepub fn maybe_index(
self,
value: Option<u64>,
) -> ReadKeyRequestBuilder<'a, SetIndex<S>>where
S::Index: IsUnset,
pub fn maybe_index(
self,
value: Option<u64>,
) -> ReadKeyRequestBuilder<'a, SetIndex<S>>where
S::Index: IsUnset,
Optional (Some / Option setters). Endpoints that support blocking queries return an HTTP header named X-Consul-Index. This is a unique identifier representing the current state of the requested resource. On subsequent requests for this resource, the client can set the index query string parameter to the value of X-Consul-Index, indicating that the client wishes to wait for any changes subsequent to that index.