pub struct Account(/* private fields */);Expand description
Represents an account identifier in the ERN (Entity Resource Name) system.
Implementations§
Source§impl Account
impl Account
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 Account with validation.
§Arguments
value- The account value to validate and create
§Validation Rules
- Account cannot be empty
- Account must be between 1 and 63 characters
- Account can only contain alphanumeric characters, hyphens, and underscores
- Account cannot start or end with a hyphen or underscore
§Returns
Ok(Account)- If validation passesErr(ErnError)- If validation fails
pub fn into_owned(self) -> Account
Trait Implementations§
Source§impl ErnComponent for Account
impl ErnComponent for Account
Source§impl PartialOrd for Account
impl PartialOrd for Account
impl Eq for Account
impl StructuralPartialEq for Account
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
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