mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-04 07:39:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			282 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			282 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
use xenevtchn::error::Result;
 | 
						|
use xenevtchn::EventChannel;
 | 
						|
 | 
						|
fn main() -> Result<()> {
 | 
						|
    let mut channel = EventChannel::open()?;
 | 
						|
    println!("Channel opened.");
 | 
						|
    let port = channel.bind_unbound_port(1)?;
 | 
						|
    println!("port: {}", port);
 | 
						|
    channel.unbind(port)?;
 | 
						|
    Ok(())
 | 
						|
}
 |