pub struct LayoutClass(/* private fields */);Expand description
Validated namespaced layout-class identity.
§Examples
use tenferro_runtime::LayoutClass;
assert_eq!(
LayoutClass::new("tenferro.layout.col-major")?.as_str(),
"tenferro.layout.col-major"
);Implementations§
Source§impl LayoutClass
impl LayoutClass
Sourcepub fn new(value: impl Into<Arc<str>>) -> Result<Self, IdentityError>
pub fn new(value: impl Into<Arc<str>>) -> Result<Self, IdentityError>
Validate a lowercase ASCII namespaced layout-class identifier.
§Examples
use tenferro_runtime::LayoutClass;
assert!(LayoutClass::new("tenferro.layout.col-major").is_ok());§Errors
Returns IdentityError with IdentityKind::LayoutClass when
value does not match the lowercase ASCII namespaced identifier grammar.
Trait Implementations§
Source§impl Clone for LayoutClass
impl Clone for LayoutClass
Source§impl Debug for LayoutClass
impl Debug for LayoutClass
impl Eq for LayoutClass
Source§impl Hash for LayoutClass
impl Hash for LayoutClass
Source§impl Ord for LayoutClass
impl Ord for LayoutClass
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for LayoutClass
impl PartialEq for LayoutClass
Source§impl PartialOrd for LayoutClass
impl PartialOrd for LayoutClass
impl StructuralPartialEq for LayoutClass
Auto Trait Implementations§
impl Freeze for LayoutClass
impl RefUnwindSafe for LayoutClass
impl Send for LayoutClass
impl Sync for LayoutClass
impl Unpin for LayoutClass
impl UnsafeUnpin for LayoutClass
impl UnwindSafe for LayoutClass
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