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