@@ -287,51 +287,6 @@ impl Account {
287
287
Problem :: check :: < RenewalInfo > ( rsp) . await
288
288
}
289
289
290
- /// Deactivate the account with the ACME server
291
- ///
292
- /// This is useful when you want to cancel an account with the ACME server
293
- /// because you don't intend to use it further, or because the account key was
294
- /// compromised.
295
- ///
296
- /// After this point no further operations can be performed with the account.
297
- /// Any existing orders or authorizations created with the ACME server will be
298
- /// invalidated.
299
- pub async fn deactivate ( self ) -> Result < ( ) , Error > {
300
- #[ derive( Serialize ) ]
301
- struct DeactivateRequest < ' a > {
302
- status : & ' a str ,
303
- }
304
-
305
- let _ = self
306
- . inner
307
- . post (
308
- Some ( & DeactivateRequest {
309
- status : "deactivated" ,
310
- } ) ,
311
- None ,
312
- self . id ( ) ,
313
- )
314
- . await ?;
315
-
316
- Ok ( ( ) )
317
- }
318
-
319
- /// Yield the profiles supported according to the account's server directory
320
- pub fn profiles ( & self ) -> impl Iterator < Item = ProfileMeta < ' _ > > {
321
- self . inner
322
- . client
323
- . directory
324
- . meta
325
- . profiles
326
- . iter ( )
327
- . map ( |( name, description) | ProfileMeta { name, description } )
328
- }
329
-
330
- /// Get the account ID
331
- pub fn id ( & self ) -> & str {
332
- & self . inner . id
333
- }
334
-
335
290
/// Update the account's authentication key
336
291
///
337
292
/// This is useful if you want to change the ACME account key of an existing account, e.g.
@@ -414,6 +369,51 @@ impl Account {
414
369
_ => Err ( "Unexpected account status after updating contact information" . into ( ) ) ,
415
370
}
416
371
}
372
+
373
+ /// Deactivate the account with the ACME server
374
+ ///
375
+ /// This is useful when you want to cancel an account with the ACME server
376
+ /// because you don't intend to use it further, or because the account key was
377
+ /// compromised.
378
+ ///
379
+ /// After this point no further operations can be performed with the account.
380
+ /// Any existing orders or authorizations created with the ACME server will be
381
+ /// invalidated.
382
+ pub async fn deactivate ( self ) -> Result < ( ) , Error > {
383
+ #[ derive( Serialize ) ]
384
+ struct DeactivateRequest < ' a > {
385
+ status : & ' a str ,
386
+ }
387
+
388
+ let _ = self
389
+ . inner
390
+ . post (
391
+ Some ( & DeactivateRequest {
392
+ status : "deactivated" ,
393
+ } ) ,
394
+ None ,
395
+ self . id ( ) ,
396
+ )
397
+ . await ?;
398
+
399
+ Ok ( ( ) )
400
+ }
401
+
402
+ /// Yield the profiles supported according to the account's server directory
403
+ pub fn profiles ( & self ) -> impl Iterator < Item = ProfileMeta < ' _ > > {
404
+ self . inner
405
+ . client
406
+ . directory
407
+ . meta
408
+ . profiles
409
+ . iter ( )
410
+ . map ( |( name, description) | ProfileMeta { name, description } )
411
+ }
412
+
413
+ /// Get the account ID
414
+ pub fn id ( & self ) -> & str {
415
+ & self . inner . id
416
+ }
417
417
}
418
418
419
419
pub ( crate ) struct AccountInner {
0 commit comments