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§fn clone(&self) -> LayoutClass
fn clone(&self) -> LayoutClass
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 LayoutClass
impl Debug for LayoutClass
Source§impl Hash for LayoutClass
impl Hash for LayoutClass
Source§impl Ord for LayoutClass
impl Ord for LayoutClass
Source§fn cmp(&self, other: &LayoutClass) -> Ordering
fn cmp(&self, other: &LayoutClass) -> 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 LayoutClass
impl PartialEq for LayoutClass
Source§fn eq(&self, other: &LayoutClass) -> bool
fn eq(&self, other: &LayoutClass) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for LayoutClass
impl PartialOrd for LayoutClass
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more