pub struct CollectionIdValue { /* private fields */ }Expand description
The value of [core] collection-id: a collection id that passes
is_valid_collection_id.
An id that fails the rule cannot be built.
§Examples
use ostrya_core::config::CollectionIdValue;
let id = CollectionIdValue::try_from("org.example.Os").unwrap();
assert_eq!(id.as_str(), "org.example.Os");
assert!(CollectionIdValue::try_from("a b").is_err());Implementations§
Trait Implementations§
Source§impl Clone for CollectionIdValue
impl Clone for CollectionIdValue
Source§impl Debug for CollectionIdValue
impl Debug for CollectionIdValue
impl Eq for CollectionIdValue
Source§impl Hash for CollectionIdValue
impl Hash for CollectionIdValue
Source§impl PartialEq for CollectionIdValue
impl PartialEq for CollectionIdValue
impl StructuralPartialEq for CollectionIdValue
Source§impl TryFrom<&str> for CollectionIdValue
impl TryFrom<&str> for CollectionIdValue
Source§fn try_from(id: &str) -> Result<CollectionIdValue, ValueError>
fn try_from(id: &str) -> Result<CollectionIdValue, ValueError>
§Errors
A ValueError if id fails the collection-id rule.
Source§type Error = ValueError
type Error = ValueError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for CollectionIdValue
impl TryFrom<String> for CollectionIdValue
Source§fn try_from(id: String) -> Result<CollectionIdValue, ValueError>
fn try_from(id: String) -> Result<CollectionIdValue, ValueError>
§Errors
A ValueError if id fails the collection-id rule.
Source§type Error = ValueError
type Error = ValueError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Forget for CollectionIdValue
impl Freeze for CollectionIdValue
impl Move for CollectionIdValue
impl RefUnwindSafe for CollectionIdValue
impl Send for CollectionIdValuewhere
RawVecInner: Send,
impl Sync for CollectionIdValuewhere
RawVecInner: Sync,
impl Unpin for CollectionIdValue
impl UnsafeUnpin for CollectionIdValue
impl UnwindSafe for CollectionIdValuewhere
RawVecInner: UnwindSafe,
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