Data Library (Data)
Linked with the "data" type.
Example Usage
fn hi() -> str { 'hi' }
#[test]
fn main() {
const o = new {};
const func = self.hi;
const dta = func.data();
dta.attach(o);
assert_eq(o.hi(), 'hi');
}Data.attach(ptr: data, obj: obj) -> bool
const func: fn = self.hi;
const other = new {};
assert(func.data().attach(other));
assert_eq(other.hi, func);Data.blob(ptr: data) -> blob
Data.drop(ptr: data) -> bool
Data.drop_from(ptr: data, obj: obj) -> bool
Data.exists(ptr: data) -> bool
Data.field(path: str) -> data
Data.from_id(id: str) -> data
Data.id(ptr: data) -> str
Data.invalidate(data: data, symbol: str = 'value') -> bool
Data.libname(ptr: data) -> str
Data.load_blob(bytes: blob, context: obj | str = self) -> data
Data.move(ptr: data, from: obj, to: obj) -> bool
Data.objs(ptr: data) -> list
Data.validate(data: data, symbol?: str) -> bool
Last updated