Translate HTTP and network tests
This commit is contained in:
@@ -188,6 +188,20 @@ MEMBER_SIGNATURE_OVERRIDES = {
|
||||
"mutable_self,owned,mutable_borrow,mutable_borrow,optional_mutable_borrow",
|
||||
),
|
||||
}
|
||||
PROPERTY_SIGNATURE_OVERRIDES = {
|
||||
"P:LibreMetaverse.GridClient.Self": (
|
||||
"pub fn self_(&mut self) -> &mut libremetaverse::AgentManager",
|
||||
"mutable_self",
|
||||
),
|
||||
"P:LibreMetaverse.GridClient.Settings": (
|
||||
"pub fn settings(&mut self) -> &mut libremetaverse::Settings",
|
||||
"mutable_self",
|
||||
),
|
||||
"P:LibreMetaverse.Settings.Timing": (
|
||||
"pub fn timing(&mut self) -> &mut libremetaverse::TimingSettings",
|
||||
"mutable_self",
|
||||
),
|
||||
}
|
||||
TYPE_USAGE_OVERRIDES = {
|
||||
"LibreMetaverse.DictionaryChangeCallback": (
|
||||
"std::sync::Arc<dyn Fn(libremetaverse::DictionaryEventAction, "
|
||||
@@ -673,6 +687,9 @@ def member_signature(mapper: Mapper, owner: dict, item: dict, rust_name: str) ->
|
||||
signature = f"pub {rust_name}: {value_type}"
|
||||
return signature, "owned_value", asyncness, "none", "direct"
|
||||
if kind in {"property", "indexer"}:
|
||||
if item["doc_id"] in PROPERTY_SIGNATURE_OVERRIDES:
|
||||
signature, ownership = PROPERTY_SIGNATURE_OVERRIDES[item["doc_id"]]
|
||||
return signature, ownership, asyncness, error_model, "accessor_methods"
|
||||
value_type = mapper.type(item["type"], item.get("nullability"), generics)
|
||||
accessors = {accessor["kind"] for accessor in item.get("accessors", [])}
|
||||
pieces = []
|
||||
|
||||
Reference in New Issue
Block a user