@@ -126,21 +126,6 @@ impl Key {
126126 self . prefix . as_ref ( )
127127 }
128128
129- /// Adds or replaces the key prefix. This takes a parsed and validated
130- /// [`KeyPrefix`] as a parameter. If instead you want to use a raw value,
131- /// use the [`Key::try_add_prefix()`] function instead.
132- pub fn add_prefix ( & mut self , prefix : KeyPrefix ) {
133- self . prefix = Some ( prefix)
134- }
135-
136- /// Adds or replaces the key prefix by parsing and validation raw input. If
137- /// instead you already have a parsed and validated [`KeyPrefix`], use the
138- /// [`Key::add_prefix()`] function instead.
139- pub fn try_add_prefix ( & mut self , prefix : impl AsRef < str > ) -> Result < & mut Self , KeyError > {
140- self . prefix = Some ( KeyPrefix :: from_str ( prefix. as_ref ( ) ) . context ( KeyPrefixSnafu ) ?) ;
141- Ok ( self )
142- }
143-
144129 /// Retrieves the key's name.
145130 ///
146131 /// ```
@@ -156,21 +141,6 @@ impl Key {
156141 pub fn name ( & self ) -> & KeyName {
157142 & self . name
158143 }
159-
160- /// Sets the key name. This takes a parsed and validated [`KeyName`] as a
161- /// parameter. If instead you want to use a raw value, use the
162- /// [`Key::try_set_name()`] function instead.
163- pub fn set_name ( & mut self , name : KeyName ) {
164- self . name = name
165- }
166-
167- /// Sets the key name by parsing and validation raw input. If instead you
168- /// already have a parsed and validated [`KeyName`], use the
169- /// [`Key::set_name()`] function instead.
170- pub fn try_set_name ( & mut self , name : impl AsRef < str > ) -> Result < & mut Self , KeyError > {
171- self . name = KeyName :: from_str ( name. as_ref ( ) ) . context ( KeyNameSnafu ) ?;
172- Ok ( self )
173- }
174144}
175145
176146/// The error type for key prefix parsing/validation operations.
0 commit comments