binarystream/stream/misc/
uuid.rs

1use napi_derive::napi;
2use napi::Result;
3use crate::binary::BinaryStream;
4use crate::types::Uuid;
5
6#[napi]
7impl BinaryStream {
8  #[napi]
9  /**
10   * **readUuid**
11   * 
12   * Reads a signed 128-bit ( 16 bytes ) uuid string from the stream.
13  */
14  pub fn read_uuid(&mut self) -> Result<String> {
15    Uuid::read(self)
16  }
17
18  #[napi]
19  /**
20   * **writeUuid**
21   * 
22   * Writes a signed 128-bit ( 16 bytes ) uuid string to the stream.
23  */
24  pub fn write_uuid(&mut self, value: String) {
25    Uuid::write(self, value);
26  }
27}