Struct bitcoin_primitives::VectorReader
source · pub struct VectorReader { /* private fields */ }Expand description
| Minimal stream for reading from an existing | vector by reference |
Implementations§
source§impl VectorReader
impl VectorReader
sourcepub fn new(ty: i32, version: i32, data: &Vec<u8>, pos: usize) -> Self
pub fn new(ty: i32, version: i32, data: &Vec<u8>, pos: usize) -> Self
| @param[in] type | | Serialization Type | ––––– | @param[in] version | | Serialization Version (including | any flags) | ––––– | @param[in] data | | Referenced byte vector to overwrite/append | ––––– | @param[in] pos | | Starting position. Vector index where | reads should start. |
sourcepub fn new_with_args<Args>(
ty: i32,
version: i32,
data: &Vec<u8>,
pos: usize,
args: Args
) -> Self
pub fn new_with_args<Args>( ty: i32, version: i32, data: &Vec<u8>, pos: usize, args: Args ) -> Self
| (other params same as above) | | ———– | @param[in] args | | A list of items to deserialize starting | at pos. |
pub fn get_version(&self) -> i32
pub fn get_type(&self) -> i32
pub fn size(&self) -> usize
pub fn empty(&self) -> bool
pub fn read(&mut self, dst: *mut u8, n: usize)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for VectorReader
impl Send for VectorReader
impl Sync for VectorReader
impl Unpin for VectorReader
impl UnwindSafe for VectorReader
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