Skip to main content

K

Type Alias K 

Source
pub type K = *mut k0;
Expand description

Struct representing q object.

Trait Implementations§

Source§

impl KUtility for K

Source§

fn as_mut_slice<'a, T>(self) -> &'a mut [T]

Derefer K as a mutable slice of the specified type. The supported types are: Read more
Source§

fn get_row( &self, index: usize, enum_sources: &[&str], ) -> Result<K, &'static str>

Get a table row of the given index. For enumerated column, a names of a target sym list to which symbol values are cast must be passed. In the example below, it is assumed that there is a single enum column in a table and the column values are cast to a symbol list whose name is sym. Read more
Source§

fn get_bool(&self) -> Result<bool, &'static str>

Get an underlying q byte. Read more
Source§

fn get_guid(&self) -> Result<[u8; 16], &'static str>

Get an underlying q byte. Read more
Source§

fn get_byte(&self) -> Result<u8, &'static str>

Get an underlying q byte. Read more
Source§

fn get_short(&self) -> Result<i16, &'static str>

Get an underlying q short. Read more
Source§

fn get_int(&self) -> Result<i32, &'static str>

Get an underlying q int. Read more
Source§

fn get_long(&self) -> Result<i64, &'static str>

Get an underlying q long. Read more
Source§

fn get_real(&self) -> Result<f32, &'static str>

Get an underlying q real. Read more
Source§

fn get_float(&self) -> Result<f64, &'static str>

Get an underlying q float. Read more
Source§

fn get_char(&self) -> Result<char, &'static str>

Get an underlying q char. Read more
Source§

fn get_symbol(&self) -> Result<&str, &'static str>

Get an underlying q symbol. Read more
Source§

fn get_str(&self) -> Result<&str, &'static str>

Get an underlying q string as &str. Read more
Source§

fn get_string(&self) -> Result<String, &'static str>

Get an underlying q string as String. Read more
Source§

fn get_dictionary(&self) -> Result<K, &'static str>

Get a flipped underlying q table as K (dictionary). Read more
Source§

fn get_error_string(&self) -> Result<&str, &'static str>

Get an underlying error symbol as &str. This function avoids false positive of processing KNULL as an error. Read more
Source§

fn get_attribute(&self) -> i8

Get an attribute of a q object. Read more
Source§

fn get_refcount(&self) -> i32

Get a reference count of a q object.
Source§

fn append(&mut self, list: K) -> Result<K, &'static str>

Append a q list object to a q list. Returns a pointer to the (potentially reallocated) K object. Read more
Source§

fn push(&mut self, atom: K) -> Result<K, &'static str>

Add a q object to a q compound list while the appended one is consumed. Returns a pointer to the (potentially reallocated) K object. Read more
Source§

fn push_raw<T>(&mut self, atom: T) -> Result<K, &'static str>

Add a raw value to a q simple list and returns a pointer to the (potentially reallocated) K object. Read more
Source§

fn push_symbol(&mut self, symbol: &str) -> Result<K, &'static str>

Add a str input to a symbol list while enumerating the character array internally. Returns a pointer to the (potentially reallocated) K object. Read more
Source§

fn push_symbol_n(&mut self, symbol: &str, n: I) -> Result<K, &'static str>

Add the first n characters of a str input to a symbol list while enumerating the character array internally. Returns a pointer to the (potentially reallocated) K object. Read more
Source§

fn len(&self) -> i64

Get the length of q object. The meaning of the returned value varies according to the type: Read more
Source§

fn get_type(&self) -> i8

Get a type of K object.
Source§

fn set_type(&mut self, qtype: i8)

Set a type of K object. Read more
Source§

fn set_attribute(&mut self, attribute: i8) -> Result<(), &'static str>

Set an attribute to q list object. Read more
Source§

fn q_ipc_encode(&self, mode: I) -> Result<K, &'static str>

Serialize q object and return serialized q byte list object on success: otherwise null. Mode is either of: Read more
Source§

fn q_ipc_decode(&self) -> Result<K, &'static str>

Deserialize a bytes into q object. Read more