mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-24 09:03:23 +00:00
新增SystemError枚举类型,使得错误处理更清晰 (#205)
This commit is contained in:
9
kernel/src/net/mod.rs
Normal file
9
kernel/src/net/mod.rs
Normal file
@ -0,0 +1,9 @@
|
||||
use core::fmt::Debug;
|
||||
|
||||
use crate::syscall::SystemError;
|
||||
|
||||
pub trait Socket: Sync + Send + Debug {
|
||||
fn read(&self, buf: &mut [u8]) -> Result<usize, SystemError>;
|
||||
|
||||
fn write(&self, buf: &[u8]) -> Result<usize, SystemError>;
|
||||
}
|
Reference in New Issue
Block a user