lexa_framework/application/interface/
cli.rs

1// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2// ┃ Copyright: (c) 2023, Mike 'PhiSyX' S. (https://github.com/PhiSyX)         ┃
3// ┃ SPDX-License-Identifier: MPL-2.0                                          ┃
4// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
5// ┃                                                                           ┃
6// ┃  This Source Code Form is subject to the terms of the Mozilla Public      ┃
7// ┃  License, v. 2.0. If a copy of the MPL was not distributed with this      ┃
8// ┃  file, You can obtain one at https://mozilla.org/MPL/2.0/.                ┃
9// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
10
11// --------- //
12// Interface //
13// --------- //
14
15pub trait ApplicationCLIInterface:
16	std::fmt::Debug + Clone + Send + Sync
17{
18	fn arguments() -> Self
19	where
20		Self: Sized;
21
22	fn shared(self) -> std::sync::Arc<Self>
23	where
24		Self: Sized,
25	{
26		std::sync::Arc::new(self)
27	}
28}
29
30// -------------- //
31// Implémentation // -> Interface
32// -------------- //
33
34impl ApplicationCLIInterface for () {
35	fn arguments() -> Self
36	where
37		Self: Sized,
38	{
39	}
40}