#[non_exhaustive]pub struct PartitionKeyBuilder { /* private fields */ }Expand description
A builder for PartitionKey.
Implementations§
source§impl PartitionKeyBuilder
impl PartitionKeyBuilder
sourcepub fn type(self, input: PartitionKeyType) -> Self
pub fn type(self, input: PartitionKeyType) -> Self
The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).
This field is required.sourcepub fn set_type(self, input: Option<PartitionKeyType>) -> Self
pub fn set_type(self, input: Option<PartitionKeyType>) -> Self
The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).
sourcepub fn get_type(&self) -> &Option<PartitionKeyType>
pub fn get_type(&self) -> &Option<PartitionKeyType>
The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the attribute used for a dimension key.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of the attribute used for a dimension key.
sourcepub fn enforcement_in_record(self, input: PartitionKeyEnforcementLevel) -> Self
pub fn enforcement_in_record(self, input: PartitionKeyEnforcementLevel) -> Self
The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).
sourcepub fn set_enforcement_in_record(
self,
input: Option<PartitionKeyEnforcementLevel>,
) -> Self
pub fn set_enforcement_in_record( self, input: Option<PartitionKeyEnforcementLevel>, ) -> Self
The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).
sourcepub fn get_enforcement_in_record(&self) -> &Option<PartitionKeyEnforcementLevel>
pub fn get_enforcement_in_record(&self) -> &Option<PartitionKeyEnforcementLevel>
The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).
sourcepub fn build(self) -> Result<PartitionKey, BuildError>
pub fn build(self) -> Result<PartitionKey, BuildError>
Consumes the builder and constructs a PartitionKey.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for PartitionKeyBuilder
impl Clone for PartitionKeyBuilder
source§fn clone(&self) -> PartitionKeyBuilder
fn clone(&self) -> PartitionKeyBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for PartitionKeyBuilder
impl Debug for PartitionKeyBuilder
source§impl Default for PartitionKeyBuilder
impl Default for PartitionKeyBuilder
source§fn default() -> PartitionKeyBuilder
fn default() -> PartitionKeyBuilder
source§impl PartialEq for PartitionKeyBuilder
impl PartialEq for PartitionKeyBuilder
impl StructuralPartialEq for PartitionKeyBuilder
Auto Trait Implementations§
impl Freeze for PartitionKeyBuilder
impl RefUnwindSafe for PartitionKeyBuilder
impl Send for PartitionKeyBuilder
impl Sync for PartitionKeyBuilder
impl Unpin for PartitionKeyBuilder
impl UnwindSafe for PartitionKeyBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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 more