mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
make non rust trait parts of vfile private
This commit is contained in:
parent
ad1f70e6e5
commit
d9a0ab1a9f
|
@ -13,7 +13,7 @@ pub enum MapFlag {
|
|||
Write,
|
||||
}
|
||||
|
||||
pub trait VFile: Seek + Read + Write {
|
||||
trait VFileExtensions: VFile {
|
||||
fn readline(&mut self, buffer: &mut [u8]) -> Result<usize> {
|
||||
let mut byte = 0;
|
||||
while byte < buffer.len() - 1 {
|
||||
|
@ -92,6 +92,10 @@ pub trait VFile: Seek + Read + Write {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait VFile: Seek + Read + Write {}
|
||||
|
||||
impl<T: VFile + ?Sized> VFileExtensions for T {}
|
||||
|
||||
#[repr(C)]
|
||||
struct VFileInner<V: VFile> {
|
||||
vfile: mgba_sys::VFile,
|
||||
|
@ -116,6 +120,7 @@ impl<V: VFile> VFileAlloc<V> {
|
|||
|
||||
mod vfile_extern {
|
||||
use std::io::SeekFrom;
|
||||
use super::VFileExtensions;
|
||||
|
||||
/// Safety: Must be part of a VFileInner
|
||||
pub unsafe fn create_vfile<V: super::VFile>() -> mgba_sys::VFile {
|
||||
|
|
Loading…
Reference in a new issue