[−][src]Struct sciter::om::som_passport_t
Defines properties and methods of an asset.
Fields
flags: u64
Flags of an asset, see som_passport_flags
.
name: som_atom_t
The name of the class (asset type).
properties: *const som_property_def_t
Properties: asset.prop
.
Must be a pointer to an array of structures:
let mut pst = Box::new(som_passport_t::default()); type ObjectProps = [som_property_def_t; 2]; let mut props = Box::new(ObjectProps::default()); let mut prop1 = &mut props[0]; prop1.name = atom("age"); let mut prop2 = &mut props[1]; prop2.name = atom("name"); pst.n_properties = 2; pst.properties = Box::into_raw(props) as *const _;
n_properties: usize
Properties count.
methods: *const som_method_def_t
Methods: asset.func()
Must be a pointer to an array of structures,
see properties
for an example.
n_methods: usize
Methods count.
item_getter: Option<extern "C" fn(thing: *mut som_asset_t, p_key: &VALUE, p_value: &mut VALUE) -> BOOL>
Index access: var item = asset[key]
.
item_setter: Option<extern "C" fn(thing: *mut som_asset_t, p_key: &VALUE, p_value: &VALUE) -> BOOL>
Index access: asset[key] = item
.
item_next: Option<extern "C" fn(thing: *mut som_asset_t, p_idx: &mut VALUE, p_value: &mut VALUE) -> BOOL>
Enumeration: for(var item in asset)
.
prop_getter: Option<extern "C" fn(thing: *mut som_asset_t, propSymbol: som_atom_t, p_value: &mut VALUE) -> BOOL>
Property access interceptor: var val = asset.prop
.
prop_setter: Option<extern "C" fn(thing: *mut som_asset_t, propSymbol: som_atom_t, p_value: &VALUE) -> BOOL>
Property set interceptor: asset.prop = val
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for som_passport_t
impl !Send for som_passport_t
impl !Sync for som_passport_t
impl Unpin for som_passport_t
impl UnwindSafe for som_passport_t
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,