Crates.io | com-shim |
lib.rs | com-shim |
version | 0.3.6 |
source | src |
created_at | 2023-08-11 15:19:05.689658 |
updated_at | 2023-09-26 13:52:08.298545 |
description | Create safe Rusty shims for COM classes. |
homepage | |
repository | https://github.com/lilopkins/com-shim-rs |
max_upload_size | |
id | 942021 |
size | 18,937 |
Easily write interfaces that can read from COM, without worrying about the underlying functionality (unless you want to!).
use com_shim::com_shim;
com_shim! {
class GuiComponent {
Text: String,
}
}
com_shim! {
class GuiVComponent {
fn SetFocus(),
}
}
com_shim! {
class GuiTextField: GuiVComponent + GuiComponent {
CaretPosition: i64,
DisplayedText: String,
mut Highlighted: bool,
fn GetListProperty(String) -> GuiComponent,
}
}
fn main() {
// The following call now would trigger a COM call:
// let a: GuiTextField;
// a.get_list_property("property");
}
You can also see it implemented in the sap-scripting
package.