rust_toolchain/
component.rs1use std::borrow::Cow;
2
3#[derive(Clone, Debug, Hash, Eq, PartialEq)]
4pub struct Component {
5 pub name: Cow<'static, str>,
6}
7
8impl Component {
9 pub fn new(name: impl Into<Cow<'static, str>>) -> Self {
10 Self { name: name.into() }
11 }
12}