[obsidian] vault backup: 2024-10-15 17:14:07[
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build / build (push) Successful in 4m29s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build / build (push) Successful in 4m29s
				
			This commit is contained in:
		| @@ -25,7 +25,7 @@ struct SystemPluginSignature{ | |||||||
| trait SystemPlugin{ | trait SystemPlugin{ | ||||||
|  fn on_init(&mut self, machine:&mut Machine); |  fn on_init(&mut self, machine:&mut Machine); | ||||||
|  fn on_sample(&mut self, machine:&mut Machine); |  fn on_sample(&mut self, machine:&mut Machine); | ||||||
|  fn get_plugin_signature(self)->Vec<> |  fn get_plugin_signature(self)->Vec<???> | ||||||
| } | } | ||||||
|  |  | ||||||
| impl<T:SystemPlugin> for Rc<RefCell<T>>{ | impl<T:SystemPlugin> for Rc<RefCell<T>>{ | ||||||
| @@ -34,4 +34,19 @@ impl<T:SystemPlugin> for Rc<RefCell<T>>{ | |||||||
|  } |  } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | struct Scheduler{ | ||||||
|  | ... | ||||||
|  | } | ||||||
|  | impl SystemPlugin for Scheduler{ | ||||||
|  | .. | ||||||
|  | 	fn get_plugin_signature(self)->?{ | ||||||
|  | 		 | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  |  | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  | プラグインの実装側では当然いくつかメンバ関数(`&mut self`と`&mut Machine`を引数にとる)を実装して、それをmimium側にエクスポートするみたいなことをしたい | ||||||
|  |  | ||||||
|  | が、そうするとSystemPluginSignatureの型の中に`Self`が混ざってくるのを避けられず、object-safeにするのが難しい | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user