Struct caffe2_serde::PyTorchStreamReader
source · pub struct PyTorchStreamReader<R: ReadAdapterInterface> { /* private fields */ }
Implementations§
source§impl<R: ReadAdapterInterface> PyTorchStreamReader<R>
impl<R: ReadAdapterInterface> PyTorchStreamReader<R>
pub fn version(&self) -> u64
pub fn has_record(&mut self, name: &String) -> bool
pub fn read(&mut self, pos: u64, buf: *mut u8, n: usize) -> usize
pub fn new(file_name: &String) -> Self
pub fn new_from_buf_reader(input: *mut BufReader<R>) -> Self
pub fn new_from_read_adapter<T: ReadAdapterInterface>(input: Arc<T>) -> Self
pub fn init(&mut self)
pub fn valid(&mut self, what: *const u8, info: *const u8)
pub fn get_all_records(&mut self) -> Vec<String>
pub fn get_recordid(&mut self, name: &String) -> usize
sourcepub fn get_record(&mut self, name: &String) -> (DataPtr, usize)
pub fn get_record(&mut self, name: &String) -> (DataPtr, usize)
return dataptr, size
pub fn get_record_offset(&mut self, name: &String) -> usize
Trait Implementations§
source§impl<R: ReadAdapterInterface> Drop for PyTorchStreamReader<R>
impl<R: ReadAdapterInterface> Drop for PyTorchStreamReader<R>
Auto Trait Implementations§
impl<R> RefUnwindSafe for PyTorchStreamReader<R>where R: RefUnwindSafe,
impl<R> Send for PyTorchStreamReader<R>where R: Send + Sync,
impl<R> Sync for PyTorchStreamReader<R>where R: Send + Sync,
impl<R> Unpin for PyTorchStreamReader<R>
impl<R> UnwindSafe for PyTorchStreamReader<R>where R: RefUnwindSafe,
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.