File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1446,6 +1446,12 @@ pub struct FsStore {
14461446 db : tokio:: sync:: mpsc:: Sender < InternalCommand > ,
14471447}
14481448
1449+ impl From < FsStore > for Store {
1450+ fn from ( value : FsStore ) -> Self {
1451+ Store :: from_sender ( value. sender )
1452+ }
1453+ }
1454+
14491455impl Deref for FsStore {
14501456 type Target = Store ;
14511457
Original file line number Diff line number Diff line change @@ -74,6 +74,12 @@ pub struct MemStore {
7474 client : ApiClient ,
7575}
7676
77+ impl From < MemStore > for crate :: api:: Store {
78+ fn from ( value : MemStore ) -> Self {
79+ crate :: api:: Store :: from_sender ( value. client )
80+ }
81+ }
82+
7783impl AsRef < crate :: api:: Store > for MemStore {
7884 fn as_ref ( & self ) -> & crate :: api:: Store {
7985 crate :: api:: Store :: ref_from_sender ( & self . client )
Original file line number Diff line number Diff line change @@ -59,6 +59,18 @@ impl Deref for ReadonlyMemStore {
5959 }
6060}
6161
62+ impl From < ReadonlyMemStore > for crate :: api:: Store {
63+ fn from ( value : ReadonlyMemStore ) -> Self {
64+ crate :: api:: Store :: from_sender ( value. client )
65+ }
66+ }
67+
68+ impl AsRef < crate :: api:: Store > for ReadonlyMemStore {
69+ fn as_ref ( & self ) -> & crate :: api:: Store {
70+ crate :: api:: Store :: ref_from_sender ( & self . client )
71+ }
72+ }
73+
6274struct Actor {
6375 commands : tokio:: sync:: mpsc:: Receiver < proto:: Command > ,
6476 tasks : JoinSet < ( ) > ,
You can’t perform that action at this time.
0 commit comments