pub struct Category(/* private fields */);Expand description
Represents a category in the ERN (Entity Resource Name) system, typically indicating the service.
Implementations§
Source§impl Category
impl Category
pub fn as_str(&self) -> &str
Sourcepub fn new(value: impl Into<String>) -> Result<Self, ErnError>
pub fn new(value: impl Into<String>) -> Result<Self, ErnError>
Creates a new Category with validation.
§Arguments
value- The category value to validate and create
§Validation Rules
- Category cannot be empty
- Category must be between 1 and 63 characters
- Category can only contain alphanumeric characters and hyphens
- Category cannot start or end with a hyphen
§Returns
Ok(Category)- If validation passesErr(ErnError)- If validation fails
pub fn into_owned(self) -> Category
Trait Implementations§
Source§impl ErnComponent for Category
impl ErnComponent for Category
Source§impl PartialOrd for Category
impl PartialOrd for Category
impl Eq for Category
impl StructuralPartialEq for Category
Auto Trait Implementations§
impl Freeze for Category
impl RefUnwindSafe for Category
impl Send for Category
impl Sync for Category
impl Unpin for Category
impl UnwindSafe for Category
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