Struct binarystream::binary::Int16
source · pub struct Int16 {}Expand description
- Int16
- Represents a signed 16-bit ( 2 bytes ) integer. ( -32768 to 32767 )
Implementations§
source§impl Int16
impl Int16
pub fn into_reference(val: Int16, env: Env) -> Result<Reference<Int16>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Int16>>
source§impl Int16
impl Int16
sourcepub fn read(
stream: &mut BinaryStream,
endian: Option<Endianness>
) -> Result<i16>
pub fn read( stream: &mut BinaryStream, endian: Option<Endianness> ) -> Result<i16>
- read
- Reads a signed 16-bit ( 2 bytes ) integer from the stream. ( -32768 to 32767 )
sourcepub fn write(stream: &mut BinaryStream, value: i16, endian: Option<Endianness>)
pub fn write(stream: &mut BinaryStream, value: i16, endian: Option<Endianness>)
- write
- Writes a signed 16-bit ( 2 bytes ) integer to the stream. ( -32768 to 32767 )
Trait Implementations§
source§impl FromNapiMutRef for Int16
impl FromNapiMutRef for Int16
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 Int16
impl FromNapiRef for Int16
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 &Int16
impl FromNapiValue for &Int16
source§impl FromNapiValue for &mut Int16
impl FromNapiValue for &mut Int16
source§impl ToNapiValue for Int16
impl ToNapiValue for Int16
source§impl ValidateNapiValue for &Int16
impl ValidateNapiValue for &Int16
Auto Trait Implementations§
impl RefUnwindSafe for Int16
impl Send for Int16
impl Sync for Int16
impl Unpin for Int16
impl UnwindSafe for Int16
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