Changeset - 81a2e2e2be13
[Not reviewed]
0 1 0
Christopher Esterhuyse - 5 years ago 2020-02-05 17:32:54
christopheresterhuyse@gmail.com
api
1 file changed with 1 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/common.rs
Show inline comments
 
@@ -50,17 +50,13 @@ pub enum MainComponentErr {
 
}
 
pub trait ProtocolDescription: Sized {
 
    type S: ComponentState<D = Self>;
 

	
 
    fn parse(pdl: &[u8]) -> Result<Self, String>;
 
    fn component_polarities(&self, identifier: &[u8]) -> Result<Vec<Polarity>, MainComponentErr>;
 
    fn new_main_component(
 
        &self,
 
        identifier: &[u8],
 
        ports: &[Key],
 
    ) -> Result<Self::S, MainComponentErr>;
 
    fn new_main_component(&self, identifier: &[u8], ports: &[Key]) -> Self::S;
 
}
 

	
 
pub trait ComponentState: Sized + Clone {
 
    type D: ProtocolDescription;
 
    fn pre_sync_run<C: MonoContext<D = Self::D, S = Self>>(
 
        &mut self,
0 comments (0 inline, 0 general)