We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d709e6 commit a233b4cCopy full SHA for a233b4c
hyperactor/src/attrs.rs
@@ -153,6 +153,13 @@ pub struct Key<T: 'static> {
153
attrs: &'static LazyLock<Attrs>,
154
}
155
156
+impl<T> Key<T> {
157
+ /// Returns the name of this key.
158
+ pub fn name(&self) -> &'static str {
159
+ self.name
160
+ }
161
+}
162
+
163
impl<T: Named + 'static> Key<T> {
164
/// Creates a new key with the given name.
165
pub const fn new(
@@ -167,11 +174,6 @@ impl<T: Named + 'static> Key<T> {
167
174
168
175
169
176
170
- /// Returns the name of this key.
171
- pub fn name(&self) -> &'static str {
172
- self.name
173
- }
-
177
/// Returns a reference to the default value for this key, if one exists.
178
pub fn default(&self) -> Option<&'static T> {
179
self.default_value
0 commit comments