@@ -19,62 +19,6 @@ simple_string_scalar!(AccountName, odf::AccountName);
1919simple_string_scalar ! ( Email , email_utils:: Email , parse) ;
2020simple_string_scalar ! ( AccountPassword , kamu_accounts:: Password , try_new) ;
2121
22- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
23-
24- #[ derive( Debug , Clone ) ]
25- pub struct AccountRef ( odf:: metadata:: auth:: AccountRef ) ;
26-
27- #[ Object ]
28- impl AccountRef {
29- pub async fn id ( & self ) -> Option < AccountID < ' _ > > {
30- self . 0 . id ( ) . map ( Into :: into)
31- }
32-
33- pub async fn name ( & self ) -> Option < AccountName < ' _ > > {
34- self . 0 . name ( ) . map ( Into :: into)
35- }
36- }
37-
38- impl From < odf:: metadata:: auth:: AccountRef > for AccountRef {
39- fn from ( value : odf:: metadata:: auth:: AccountRef ) -> Self {
40- Self ( value)
41- }
42- }
43-
44- impl From < AccountRef > for odf:: metadata:: auth:: AccountRef {
45- fn from ( value : AccountRef ) -> Self {
46- value. 0
47- }
48- }
49-
50- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
51-
52- #[ derive( Debug , Clone ) ]
53- pub struct AccountHandle ( odf:: metadata:: auth:: AccountHandle ) ;
54-
55- #[ Object ]
56- impl AccountHandle {
57- pub async fn id ( & self ) -> AccountID < ' _ > {
58- AccountID :: from ( & self . 0 . id )
59- }
60-
61- pub async fn name ( & self ) -> AccountName < ' _ > {
62- AccountName :: from ( & self . 0 . name )
63- }
64- }
65-
66- impl From < odf:: metadata:: auth:: AccountHandle > for AccountHandle {
67- fn from ( value : odf:: metadata:: auth:: AccountHandle ) -> Self {
68- Self ( value)
69- }
70- }
71-
72- impl From < AccountHandle > for odf:: metadata:: auth:: AccountHandle {
73- fn from ( value : AccountHandle ) -> Self {
74- value. 0
75- }
76- }
77-
7822////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7923// AccountDisplayName
8024////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0 commit comments