Struct binarystream::binary::Short
source · pub struct Short {}Expand description
- Short
- Represents a signed 16-bit ( 2 bytes ) integer. ( -32768 to 32767 )
Implementations§
source§impl Short
impl Short
pub fn into_reference(val: Short, env: Env) -> Result<Reference<Short>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Short>>
source§impl Short
impl Short
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 Short
impl FromNapiMutRef for Short
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 Short
impl FromNapiRef for Short
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 &Short
impl FromNapiValue for &Short
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 Short
impl FromNapiValue for &mut Short
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 Short
impl ToNapiValue for Short
source§unsafe fn to_napi_value(env: napi_env, val: Short) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Short) -> Result<napi_value>
Safety Read more
source§impl ValidateNapiValue for &Short
impl ValidateNapiValue for &Short
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 Short
impl ValidateNapiValue for &mut Short
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 Short
impl RefUnwindSafe for Short
impl Send for Short
impl Sync for Short
impl Unpin for Short
impl UnwindSafe for Short
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