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