Struct bitcoin_primitives::BufferedFile
source · pub struct BufferedFile { /* private fields */ }Expand description
| Non-refcounted RAII wrapper around | a FILE* that implements a ring buffer | to deserialize from. It guarantees | the ability to rewind a given number | of bytes. | | Will automatically close the file when | it goes out of scope if not null. | | If you need to close the file early, use | file.fclose() instead of fclose(file). |
Implementations§
source§impl BufferedFile
impl BufferedFile
pub fn new( file_in: *mut FILE, n_buf_size: u64, n_rewind_in: u64, n_type_in: i32, n_version_in: i32 ) -> Self
pub fn get_version(&self) -> i32
pub fn get_type(&self) -> i32
pub fn fclose(&mut self)
Trait Implementations§
source§impl Drop for BufferedFile
impl Drop for BufferedFile
Auto Trait Implementations§
impl RefUnwindSafe for BufferedFile
impl !Send for BufferedFile
impl !Sync for BufferedFile
impl Unpin for BufferedFile
impl UnwindSafe for BufferedFile
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more