Implement StructuredData OSD model and containers
This commit is contained in:
@@ -38,6 +38,21 @@ TARGETS = {
|
||||
# implementations. The generated module keeps catalog markers and re-exports
|
||||
# the hand-written type so coverage remains deterministic.
|
||||
NATIVE_TYPES = {
|
||||
"T:LibreMetaverse.StructuredData.OSD": "crate::model::OSD",
|
||||
"T:LibreMetaverse.StructuredData.OSDArray": "crate::model::OSDArray",
|
||||
"T:LibreMetaverse.StructuredData.OSDBinary": "crate::model::OSDBinary",
|
||||
"T:LibreMetaverse.StructuredData.OSDBoolean": "crate::model::OSDBoolean",
|
||||
"T:LibreMetaverse.StructuredData.OSDDate": "crate::model::OSDDate",
|
||||
"T:LibreMetaverse.StructuredData.OSDException": "crate::model::OSDException",
|
||||
"T:LibreMetaverse.StructuredData.OSDFormat": "crate::model::OSDFormat",
|
||||
"T:LibreMetaverse.StructuredData.OSDInteger": "crate::model::OSDInteger",
|
||||
"T:LibreMetaverse.StructuredData.OSDLlsdXml": "crate::model::OSDLlsdXml",
|
||||
"T:LibreMetaverse.StructuredData.OSDMap": "crate::model::OSDMap",
|
||||
"T:LibreMetaverse.StructuredData.OSDReal": "crate::model::OSDReal",
|
||||
"T:LibreMetaverse.StructuredData.OSDString": "crate::model::OSDString",
|
||||
"T:LibreMetaverse.StructuredData.OSDType": "crate::model::OSDType",
|
||||
"T:LibreMetaverse.StructuredData.OSDUUID": "crate::model::OSDUUID",
|
||||
"T:LibreMetaverse.StructuredData.OSDUri": "crate::model::OSDUri",
|
||||
"T:LibreMetaverse.CacheDictionary`2": "crate::collections::CacheDictionary",
|
||||
"T:LibreMetaverse.CacheDictionary`2.CacheDictionaryEnumerator": "crate::collections::CacheDictionaryCacheDictionaryEnumerator",
|
||||
"T:LibreMetaverse.Color4": "crate::color4::Color4",
|
||||
@@ -64,6 +79,12 @@ NATIVE_TYPES = {
|
||||
}
|
||||
|
||||
NATIVE_MEMBER_BODIES = {
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.Deserialize(System.Byte[])":
|
||||
"crate::dispatch::deserialize_bytes(data)",
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.Deserialize(System.IO.Stream)":
|
||||
"crate::dispatch::deserialize_stream(stream)",
|
||||
"M:LibreMetaverse.StructuredData.OSDParser.Deserialize(System.String)":
|
||||
"crate::dispatch::deserialize_string(data)",
|
||||
"M:LibreMetaverse.Utils.ReadSingleLittleEndian(System.Byte[],System.Int32)":
|
||||
"crate::byte_order::read_single_little_endian(src, pos)",
|
||||
"M:LibreMetaverse.Utils.WriteSingleLittleEndian(System.Byte[],System.Int32,System.Single)":
|
||||
|
||||
@@ -189,6 +189,14 @@ MEMBER_TYPE_OVERRIDES = {
|
||||
),
|
||||
}
|
||||
MEMBER_SIGNATURE_OVERRIDES = {
|
||||
"M:LibreMetaverse.StructuredData.OSDArray.CopyTo(LibreMetaverse.StructuredData.OSD[],System.Int32)": (
|
||||
"pub fn copy_to(&self, array: &mut [libremetaverse_structured_data::OSD], index: i32) -> Result<(), crate::Error>",
|
||||
"shared_self,mutable_borrow,owned",
|
||||
),
|
||||
"M:LibreMetaverse.StructuredData.OSDMap.CopyTo(System.Collections.Generic.KeyValuePair{System.String,LibreMetaverse.StructuredData.OSD}[],System.Int32)": (
|
||||
"pub fn copy_to(&self, array: &mut [(String, libremetaverse_structured_data::OSD)], index: i32) -> Result<(), crate::Error>",
|
||||
"shared_self,mutable_borrow,owned",
|
||||
),
|
||||
"M:LibreMetaverse.CacheDictionary`2.CopyTo(System.Collections.Generic.KeyValuePair{`0,`1}[],System.Int32)": (
|
||||
"pub fn copy_to(&self, array: &mut [(TKey, Option<TValue>)], array_index: i32) -> Result<(), crate::Error>",
|
||||
"shared_self,mutable_borrow,owned",
|
||||
@@ -972,6 +980,7 @@ def validate_generated_shims() -> None:
|
||||
"not_implemented(",
|
||||
"NotImplemented::new(",
|
||||
"crate::byte_order::",
|
||||
"crate::dispatch::",
|
||||
)
|
||||
):
|
||||
raise ValueError(f"generated shim function does not use the standardized failure: {path.relative_to(ROOT)}")
|
||||
|
||||
Reference in New Issue
Block a user