Move yunq client to use syscall helpers.
This commit is contained in:
parent
5705f8d2ab
commit
c2f9f5388b
3 changed files with 53 additions and 25 deletions
|
|
@ -15,12 +15,12 @@ impl<const N: usize> ByteBuffer<N> {
|
|||
N as u64
|
||||
}
|
||||
|
||||
pub fn raw_ptr(&self) -> *const u8 {
|
||||
self.buffer.as_ptr()
|
||||
pub fn slice(&self, len: usize) -> &[u8] {
|
||||
&self.buffer[..len]
|
||||
}
|
||||
|
||||
pub fn mut_ptr(&mut self) -> *mut u8 {
|
||||
self.buffer.as_mut_ptr()
|
||||
pub fn mut_slice(&mut self) -> &mut [u8] {
|
||||
&mut self.buffer[..]
|
||||
}
|
||||
|
||||
pub fn write_at<T>(&mut self, offset: usize, obj: T) -> Result<(), ZError> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue