Struct binarystream::binary::ZigZag
source · pub struct ZigZag {}Expand description
- ZigZag
- Represents a 32 bit ( 4 bytes ) zigzag encoded signed variable length integer. ( -2147483648 to 2147483647 )
Implementations§
source§impl ZigZag
impl ZigZag
pub fn into_reference(val: ZigZag, env: Env) -> Result<Reference<ZigZag>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<ZigZag>>
source§impl ZigZag
impl ZigZag
sourcepub fn read(stream: &mut BinaryStream) -> Result<i32>
pub fn read(stream: &mut BinaryStream) -> Result<i32>
- read
- Reads a 32 bit ( 4 bytes ) zigzag encoded signed variable length integer from the stream. ( -2147483648 to 2147483647 )
sourcepub fn write(stream: &mut BinaryStream, value: i32)
pub fn write(stream: &mut BinaryStream, value: i32)
- write
- Writes a 32 bit ( 4 bytes ) zigzag encoded signed variable length integer to the stream. ( -2147483648 to 2147483647 )
Trait Implementations§
source§impl FromNapiMutRef for ZigZag
impl FromNapiMutRef for ZigZag
source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
source§impl FromNapiRef for ZigZag
impl FromNapiRef for ZigZag
source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
source§impl FromNapiValue for &ZigZag
impl FromNapiValue for &ZigZag
source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
source§impl FromNapiValue for &mut ZigZag
impl FromNapiValue for &mut ZigZag
source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
source§impl ToNapiValue for ZigZag
impl ToNapiValue for ZigZag
source§unsafe fn to_napi_value(env: napi_env, val: ZigZag) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: ZigZag) -> Result<napi_value>
Safety Read more
source§impl ValidateNapiValue for &ZigZag
impl ValidateNapiValue for &ZigZag
source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
source§impl ValidateNapiValue for &mut ZigZag
impl ValidateNapiValue for &mut ZigZag
source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for ZigZag
impl RefUnwindSafe for ZigZag
impl Send for ZigZag
impl Sync for ZigZag
impl Unpin for ZigZag
impl UnwindSafe for ZigZag
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more