pub struct WindowName {
pub snake: String,
pub pascal: String,
pub title: String,
pub original: String,
}Expand description
A validated window name with multiple case representations
Fields§
§snake: Stringsnake_case representation (used for filenames)
pascal: StringPascalCase representation (used in Rust struct names)
title: StringTitle Case representation (used in UI text)
original: StringOriginal input (for error messages)
Implementations§
Source§impl WindowName
impl WindowName
Sourcepub fn new(name: &str) -> Result<Self, ValidationError>
pub fn new(name: &str) -> Result<Self, ValidationError>
Create a validated window name from user input
§Errors
Returns ValidationError if:
- Name is empty
- First character is not a letter or underscore
- Name contains invalid characters (not alphanumeric or underscore)
- Name is a reserved Rust keyword
Sourcepub fn to_variants(&self) -> WindowNameVariants
pub fn to_variants(&self) -> WindowNameVariants
Convert to WindowNameVariants for template rendering
Trait Implementations§
Source§impl Clone for WindowName
impl Clone for WindowName
Source§fn clone(&self) -> WindowName
fn clone(&self) -> WindowName
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowName
impl Debug for WindowName
Source§impl PartialEq for WindowName
impl PartialEq for WindowName
impl Eq for WindowName
impl StructuralPartialEq for WindowName
Auto Trait Implementations§
impl Freeze for WindowName
impl RefUnwindSafe for WindowName
impl Send for WindowName
impl Sync for WindowName
impl Unpin for WindowName
impl UnwindSafe for WindowName
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.