pub struct ProfileKey(String);Expand description
One org’s browser profile, <org>/<name>: two path-safe segments, and the
unit every profile lookup is keyed by.
Tuple Fields§
§0: StringImplementations§
Source§impl ProfileKey
impl ProfileKey
pub fn of(org: &str, name: &str) -> Result<Self, String>
Sourcepub fn parse(key: &str) -> Result<Self, String>
pub fn parse(key: &str) -> Result<Self, String>
Parse <org>/<name>; both halves become directory names.
pub fn as_str(&self) -> &str
pub fn org(&self) -> &str
pub fn name(&self) -> &str
Sourcepub fn from_parts_for_test(org: &str, name: &str) -> Self
pub fn from_parts_for_test(org: &str, name: &str) -> Self
A fixture’s key, from parts the fixture chose and so already knows are safe.
Trait Implementations§
Source§impl Clone for ProfileKey
impl Clone for ProfileKey
Source§impl Debug for ProfileKey
impl Debug for ProfileKey
Source§impl<'de> Deserialize<'de> for ProfileKey
impl<'de> Deserialize<'de> for ProfileKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ProfileKey
Source§impl Hash for ProfileKey
impl Hash for ProfileKey
Source§impl Ord for ProfileKey
impl Ord for ProfileKey
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 ProfileKey
impl PartialEq for ProfileKey
Source§impl PartialOrd for ProfileKey
impl PartialOrd for ProfileKey
Source§impl Serialize for ProfileKey
impl Serialize for ProfileKey
impl StructuralPartialEq for ProfileKey
Auto Trait Implementations§
impl Freeze for ProfileKey
impl RefUnwindSafe for ProfileKey
impl Send for ProfileKey
impl Sync for ProfileKey
impl Unpin for ProfileKey
impl UnsafeUnpin for ProfileKey
impl UnwindSafe for ProfileKey
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
Checks if this value is equivalent to the given key. Read more
§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.