pub struct FieldKey(/* private fields */);Expand description
Field key matching pattern [a-z_]+.
Implementations§
Source§impl FieldKey
impl FieldKey
Sourcepub fn new(value: impl Into<String>) -> Result<Self, AadError>
pub fn new(value: impl Into<String>) -> Result<Self, AadError>
Creates a new FieldKey.
§Errors
EmptyFieldKeyif emptyInvalidFieldKeyif contains characters outside[a-z_]
Sourcepub fn is_reserved(&self) -> bool
pub fn is_reserved(&self) -> bool
True if the key matches any reserved field name (v, tenant, resource, purpose, ts).
Sourcepub fn validate_as_extension(&self) -> Result<(), AadError>
pub fn validate_as_extension(&self) -> Result<(), AadError>
Validates that this key is a valid extension key (x_<app>_<field>).
Pattern: ^x_[a-z]+_[a-z_]+$
- must start with
x_ - app segment: one or more lowercase letters
- field segment: one or more lowercase letters or underscores
§Errors
Returns InvalidExtensionKeyFormat if the key doesn’t match the pattern.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FieldKey
impl<'de> Deserialize<'de> for FieldKey
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for FieldKey
impl Ord for FieldKey
Source§impl PartialOrd for FieldKey
impl PartialOrd for FieldKey
impl Eq for FieldKey
impl StructuralPartialEq for FieldKey
Auto Trait Implementations§
impl Freeze for FieldKey
impl RefUnwindSafe for FieldKey
impl Send for FieldKey
impl Sync for FieldKey
impl Unpin for FieldKey
impl UnsafeUnpin for FieldKey
impl UnwindSafe for FieldKey
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