Generate Types and StructuredData API shims

This commit is contained in:
2026-08-08 11:56:13 +02:00
parent d3f5e27f52
commit 0a2e7dd057
15 changed files with 12120 additions and 5154 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,17 @@
//! Structured-data types corresponding to `LibreMetaverse.StructuredData`.
extern crate self as libremetaverse_structured_data;
mod generated;
pub mod xml {
/// Native XML reader boundary; external XML APIs are not copied.
pub struct Reader;
/// Native XML writer boundary; external XML APIs are not copied.
pub struct Writer;
}
pub use generated::*;
pub use libremetaverse_types as types;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -0,0 +1,61 @@
//! Project-owned replacements for external types exposed by C# signatures.
//!
//! These types preserve Rust API identity without copying external member
//! surfaces. Their behavior is implemented only when the owning API slice is
//! ported.
use std::marker::PhantomData;
pub trait Collection<T> {}
pub trait ReadWrite: std::io::Read + std::io::Write {}
impl<T: std::io::Read + std::io::Write> ReadWrite for T {}
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Object(u8);
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct Utf16CodeUnit(pub u16);
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct Guid(pub [u8; 16]);
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Uri(pub String);
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Regex(pub String);
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct CultureInfo(pub String);
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct ExternalError(pub String);
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct EnumValue(pub i64);
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ArrayList(pub Vec<Object>);
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Array(pub Vec<Object>);
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Hashtable(pub std::collections::HashMap<Object, Object>);
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct IDictionaryEnumerator;
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct IEqualityComparer<T>(pub PhantomData<fn(T)>);
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct StringReader(pub String);
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct StringWriter(pub String);
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct TypeId(pub &'static str);

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,8 @@
//! Core value types corresponding to `LibreMetaverse.Types`.
extern crate self as libremetaverse_types;
pub mod compat;
mod generated;
pub mod shim;