Skip to content

Commit a3829c4

Browse files
committed
fix: add missing traits; macros and types pub.
1 parent 345b7d2 commit a3829c4

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

  • crates/stackable-operator/src/v2
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1+
use crate::v2::types::kubernetes::Uid;
2+
13
pub mod config_overrides;
4+
pub mod macros;
5+
pub mod types;
6+
7+
/// Has a non-empty name
8+
///
9+
/// Useful as an object reference; Should not be used to create an object because the name could
10+
/// violate the naming constraints (e.g. maximum length) of the object.
11+
pub trait HasName {
12+
#[allow(dead_code)]
13+
fn to_name(&self) -> String;
14+
}
15+
16+
/// Has a Kubernetes UID
17+
pub trait HasUid {
18+
fn to_uid(&self) -> Uid;
19+
}
20+
21+
/// The name is a valid label value
22+
pub trait NameIsValidLabelValue {
23+
fn to_label_value(&self) -> String;
24+
}

0 commit comments

Comments
 (0)