create constructors for VmcExtOpt
This commit is contained in:
		
							parent
							
								
									22997061b6
								
							
						
					
					
						commit
						efe25b28f1
					
				
							
								
								
									
										14
									
								
								src/lib.rs
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								src/lib.rs
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -1438,7 +1438,7 @@ impl VmcExtRemote {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
#[derive(Debug)]
 | 
			
		||||
struct VmcExtOpt {
 | 
			
		||||
pub struct VmcExtOpt {
 | 
			
		||||
    option: String,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1467,6 +1467,18 @@ impl VmcMessage for VmcExtOpt {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl VmcExtOpt {
 | 
			
		||||
    pub fn new(option: String) ->MsgNewResult<Self> {
 | 
			
		||||
        Ok(Self { option })
 | 
			
		||||
    }
 | 
			
		||||
    pub fn new_vmc_message(option: String) -> TraitMsgNewResult {
 | 
			
		||||
        match Self::new(option) {
 | 
			
		||||
            Ok(val) => Ok(Box::new(val)),
 | 
			
		||||
            Err(val) => Err(val)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[derive(Debug)]
 | 
			
		||||
struct VmcExtSettingColor {
 | 
			
		||||
    color: Color,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user