#[non_exhaustive]pub struct ClusterIdSegment {
pub axis: String,
pub value: String,
}Expand description
A single axis:value pair within a ClusterId.
ClusterIdSegment is #[non_exhaustive] — construct values via
ClusterIdSegment::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.axis: StringAxis name (e.g. file, score).
value: StringValue within that axis (e.g. src/cli.rs, excellent).
Implementations§
Source§impl ClusterIdSegment
impl ClusterIdSegment
Sourcepub fn new(axis: impl Into<String>, value: impl Into<String>) -> Self
pub fn new(axis: impl Into<String>, value: impl Into<String>) -> Self
Construct a segment from any types that convert into String.
ClusterIdSegment is #[non_exhaustive]; downstream callers
(notably integration tests) build segments through this
constructor.
§Examples
use face_core::ClusterIdSegment;
let s = ClusterIdSegment::new("file", "src/cli.rs");
assert_eq!(s.axis, "file");
assert_eq!(s.value, "src/cli.rs");Trait Implementations§
Source§impl Clone for ClusterIdSegment
impl Clone for ClusterIdSegment
Source§fn clone(&self) -> ClusterIdSegment
fn clone(&self) -> ClusterIdSegment
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 ClusterIdSegment
impl Debug for ClusterIdSegment
impl Eq for ClusterIdSegment
Source§impl Hash for ClusterIdSegment
impl Hash for ClusterIdSegment
Source§impl PartialEq for ClusterIdSegment
impl PartialEq for ClusterIdSegment
impl StructuralPartialEq for ClusterIdSegment
Auto Trait Implementations§
impl Freeze for ClusterIdSegment
impl RefUnwindSafe for ClusterIdSegment
impl Send for ClusterIdSegment
impl Sync for ClusterIdSegment
impl Unpin for ClusterIdSegment
impl UnsafeUnpin for ClusterIdSegment
impl UnwindSafe for ClusterIdSegment
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