mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 20:33:54 -06:00
rust: qom: add initial subset of methods on Object
Add an example of implementing instance methods and converting the result back to a Rust type. In this case the returned types are a string (actually a Cow<str>; but that's transparent as long as it derefs to &str) and a QOM class. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
f50cd85c84
commit
ba3b81f3b6
3 changed files with 66 additions and 3 deletions
|
@ -12,6 +12,7 @@ pub use crate::qom::Object;
|
|||
pub use crate::qom::ObjectCast;
|
||||
pub use crate::qom::ObjectCastMut;
|
||||
pub use crate::qom::ObjectDeref;
|
||||
pub use crate::qom::ObjectMethods;
|
||||
pub use crate::qom::ObjectType;
|
||||
|
||||
pub use crate::qom_isa;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue