Lines Matching refs:io
14 use std::io;
24 pub fn get_rpc_binder_service(cid: u32) -> io::Result<VirtFdService> { in get_rpc_binder_service()
27 io::Error::new(io::ErrorKind::InvalidInput, "Invalid raw AIBinder") in get_rpc_binder_service()
29 _ => io::Error::new( in get_rpc_binder_service()
30 io::ErrorKind::AddrNotAvailable, in get_rpc_binder_service()
42 fn read_chunk(&self, chunk_index: u64, buf: &mut ChunkBuffer) -> io::Result<usize>; in read_chunk()
53 fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize>; in write_at()
56 fn write_all_at(&self, buf: &[u8], offset: u64) -> io::Result<()> { in write_all_at()
68 fn resize(&self, size: u64) -> io::Result<()>; in resize()
72 pub fn validate_basename(path: &Path) -> io::Result<()> { in validate_basename()
76 Err(io::Error::from_raw_os_error(libc::EINVAL)) in validate_basename()
85 pub fn new<F: ReadByChunk>(chunked_file: F, file_size: u64) -> io::Result<EagerChunkReader> { in new()
95 Err(io::Error::new( in new()
96 io::ErrorKind::InvalidData, in new()
106 fn read_chunk(&self, chunk_index: u64, buf: &mut ChunkBuffer) -> io::Result<usize> { in read_chunk()