pub struct VectorSpaceName(/* private fields */);Expand description
Canonical bounded ASCII name for one vector space.
Implementations§
Source§impl VectorSpaceName
impl VectorSpaceName
Sourcepub fn new(value: impl Into<String>) -> Result<Self, VectorValueError>
pub fn new(value: impl Into<String>) -> Result<Self, VectorValueError>
Validates and constructs a canonical vector-space name.
§Errors
Returns an error unless value matches
[A-Za-z][A-Za-z0-9._-]{0,127}.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the name and returns its canonical string.
Trait Implementations§
Source§impl Clone for VectorSpaceName
impl Clone for VectorSpaceName
Source§fn clone(&self) -> VectorSpaceName
fn clone(&self) -> VectorSpaceName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VectorSpaceName
impl Debug for VectorSpaceName
Source§impl Display for VectorSpaceName
impl Display for VectorSpaceName
impl Eq for VectorSpaceName
Source§impl Ord for VectorSpaceName
impl Ord for VectorSpaceName
Source§fn cmp(&self, other: &VectorSpaceName) -> Ordering
fn cmp(&self, other: &VectorSpaceName) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for VectorSpaceName
impl PartialEq for VectorSpaceName
Source§impl PartialOrd for VectorSpaceName
impl PartialOrd for VectorSpaceName
impl StructuralPartialEq for VectorSpaceName
Auto Trait Implementations§
impl Freeze for VectorSpaceName
impl RefUnwindSafe for VectorSpaceName
impl Send for VectorSpaceName
impl Sync for VectorSpaceName
impl Unpin for VectorSpaceName
impl UnsafeUnpin for VectorSpaceName
impl UnwindSafe for VectorSpaceName
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