ic_core_module/
core_null_command.rs

1use intel_cache_lib::ic_types::IcPacket;
2//use crate::ic_types::IcExecute;
3use intel_cache_lib::ic_types::ic_execute_mod::IcExecute;
4use intel_cache_lib::ic_types::IcConnection;
5
6pub struct CoreNull {}
7impl CoreNull {
8	#[no_mangle]
9	pub fn cn_new() -> CoreNull {
10		CoreNull { }
11	}
12	
13	#[no_mangle]
14	pub fn cn_to_exe() -> Box<dyn IcExecute<Connection = IcConnection>> {
15		Box::new(CoreNull::cn_new())
16	}
17}
18impl IcExecute for CoreNull {
19	type Connection = IcConnection;
20	fn exec(&mut self,_con: &mut Self::Connection,_cmd: Option<Vec<String>>,_data: Option<Vec<u8>>,_cached: bool) -> IcPacket {
21		IcPacket::new_empty()
22	}
23	
24	fn login_required(&mut self) -> bool {
25		false
26	}
27}