Struct binarystream::binary::VarLong
source · pub struct VarLong {}Expand description
- VarLong
- Represents a 64 bit ( 8 bytes ) unsigned variable length integer. ( 0 to 18446744073709551615 )
Implementations§
source§impl VarLong
impl VarLong
pub fn into_reference(val: VarLong, env: Env) -> Result<Reference<VarLong>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<VarLong>>
source§impl VarLong
impl VarLong
sourcepub fn read(stream: &mut BinaryStream) -> Result<BigInt>
pub fn read(stream: &mut BinaryStream) -> Result<BigInt>
- read
- Reads a 64 bit ( 8 bytes ) unsigned variable length integer from the stream. ( 0 to 18446744073709551615 )
sourcepub fn write(stream: &mut BinaryStream, value: BigInt)
pub fn write(stream: &mut BinaryStream, value: BigInt)
- write
- Writes a 64 bit ( 8 bytes ) unsigned variable length integer to the stream. ( 0 to 18446744073709551615 )
Trait Implementations§
source§impl FromNapiMutRef for VarLong
impl FromNapiMutRef for VarLong
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 VarLong
impl FromNapiRef for VarLong
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 &VarLong
impl FromNapiValue for &VarLong
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 VarLong
impl FromNapiValue for &mut VarLong
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 VarLong
impl ToNapiValue for VarLong
source§unsafe fn to_napi_value(env: napi_env, val: VarLong) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: VarLong) -> Result<napi_value>
Safety Read more
source§impl ValidateNapiValue for &VarLong
impl ValidateNapiValue for &VarLong
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 VarLong
impl ValidateNapiValue for &mut VarLong
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 VarLong
impl RefUnwindSafe for VarLong
impl Send for VarLong
impl Sync for VarLong
impl Unpin for VarLong
impl UnwindSafe for VarLong
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