Standardize unimplemented API failures

This commit is contained in:
2026-08-08 11:44:46 +02:00
parent 3179d7a57d
commit d3f5e27f52
41 changed files with 1875 additions and 1608 deletions

12
Cargo.lock generated
View File

@@ -33,23 +33,31 @@ dependencies = [
[[package]] [[package]]
name = "libremetaverse-imaging" name = "libremetaverse-imaging"
version = "0.0.1" version = "0.0.1"
dependencies = [
"libremetaverse-types",
]
[[package]] [[package]]
name = "libremetaverse-imaging-skia" name = "libremetaverse-imaging-skia"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"libremetaverse-imaging", "libremetaverse-imaging",
"libremetaverse-types",
] ]
[[package]] [[package]]
name = "libremetaverse-lsl-tools" name = "libremetaverse-lsl-tools"
version = "0.0.1" version = "0.0.1"
dependencies = [
"libremetaverse-types",
]
[[package]] [[package]]
name = "libremetaverse-prim-mesher" name = "libremetaverse-prim-mesher"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"libremetaverse-imaging", "libremetaverse-imaging",
"libremetaverse-types",
] ]
[[package]] [[package]]
@@ -84,6 +92,9 @@ dependencies = [
[[package]] [[package]]
name = "libremetaverse-rlv" name = "libremetaverse-rlv"
version = "0.0.1" version = "0.0.1"
dependencies = [
"libremetaverse-types",
]
[[package]] [[package]]
name = "libremetaverse-structured-data" name = "libremetaverse-structured-data"
@@ -120,4 +131,5 @@ version = "0.0.1"
dependencies = [ dependencies = [
"libremetaverse", "libremetaverse",
"libremetaverse-structured-data", "libremetaverse-structured-data",
"libremetaverse-types",
] ]

View File

@@ -19,6 +19,9 @@ The authoritative compiled .NET surface is checked in as
reviewed Rust destination in [`api/RUST-TYPES.tsv`](api/RUST-TYPES.tsv) and reviewed Rust destination in [`api/RUST-TYPES.tsv`](api/RUST-TYPES.tsv) and
[`api/RUST-MAPPING.tsv`](api/RUST-MAPPING.tsv); [`api/README.md`](api/README.md) [`api/RUST-MAPPING.tsv`](api/RUST-MAPPING.tsv); [`api/README.md`](api/README.md)
documents deterministic regeneration and validation. documents deterministic regeneration and validation.
All API crates expose the same typed `Error` for fallible unimplemented members;
infallible shims use `libremetaverse_types::unimplemented_api!` so placeholders
cannot look like successful behavior.
```sh ```sh
cargo build --workspace cargo build --workspace

View File

@@ -254,6 +254,27 @@ must have their real values. Never return plausible defaults such as `false`,
zero, an empty collection, or a nil UUID: those could make translated tests pass zero, an empty collection, or a nil UUID: those could make translated tests pass
for the wrong reason. for the wrong reason.
The failure contract lives in `libremetaverse-types` and every API crate exposes
it as `crate::Error`:
- synchronous fallible members return `Err(NotImplemented::new(CSHARP_ID))`;
async members do the same when first polled and start no work first;
- a stream-producing operation returns the typed error before exposing a
stream; an intrinsically infallible stream factory uses `unimplemented_api!`
instead of returning an empty stream;
- callback registration and stored-trait construction fail before retaining the
callback/object; generated callbacks are never silent no-ops;
- infallible constructors, accessors, operators, and trait methods call
`unimplemented_api!(CSHARP_ID)`, whose panic marker is distinct from every
typed domain error;
- constants, enum discriminants, flags, and inert public fields use their real
catalog values/layout. Generated shims do not derive `Default` unless the
reviewed API explicitly defines that behavior.
`python3 tools/generate_rust_mapping.py --check` scans every generated shim and
rejects `Default` derives, plausible false/zero/empty/nil returns, and any
function body that lacks the standardized typed error or panic mechanism.
The signature gate is complete only when: The signature gate is complete only when:
- the metadata catalog reports 100% public type/member mapping coverage for all - the metadata catalog reports 100% public type/member mapping coverage for all

View File

@@ -12,6 +12,7 @@ Generated by `python3 tools/generate_rust_mapping.py`; do not edit by hand.
- Stale or missing catalog IDs: **0** - Stale or missing catalog IDs: **0**
- Unresolved referenced types: **0** - Unresolved referenced types: **0**
- Platform-specific mappings: **0** - Platform-specific mappings: **0**
- Plausible generated fallback bodies/default derives: **0**
## Assembly representatives ## Assembly representatives

View File

@@ -42,6 +42,9 @@ python3 tools/generate_rust_mapping.py --check
The checker rejects duplicate C# IDs, duplicate Rust destinations, invalid The checker rejects duplicate C# IDs, duplicate Rust destinations, invalid
statuses, stale or missing catalog entries, unresolved signature types, statuses, stale or missing catalog entries, unresolved signature types,
assemblies without representative mappings, and platform-specific API targets. assemblies without representative mappings, and platform-specific API targets.
It also rejects generated `Default` shims, plausible false/zero/empty/nil
fallbacks, and generated function bodies that do not use the standardized
`NotImplemented` error or `unimplemented_api!` panic.
The two support traits in `RUST-TYPES.tsv` are included because compiled public The two support traits in `RUST-TYPES.tsv` are included because compiled public
inheritance records reference them even though they are absent from the public inheritance records reference them even though they are absent from the public
type table. type table.

View File

@@ -9,6 +9,7 @@ description = "Skia codec shims for the MetaCrate LibreMetaverse rewrite"
[dependencies] [dependencies]
libremetaverse-imaging = { path = "../libremetaverse-imaging" } libremetaverse-imaging = { path = "../libremetaverse-imaging" }
libremetaverse-types = { path = "../libremetaverse-types" }
[lints] [lints]
workspace = true workspace = true

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `class` shim for C# `LibreMetaverse.Imaging.Skia.SkiaTextureCodec`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Imaging.Skia.SkiaTextureCodec`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SkiaTextureCodec; pub struct SkiaTextureCodec;
impl SkiaTextureCodec { impl SkiaTextureCodec {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Imaging.Skia.SkiaTextureCodec"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Imaging.Skia.SkiaTextureCodec";

View File

@@ -4,3 +4,4 @@ mod generated;
pub use generated::*; pub use generated::*;
pub use libremetaverse_imaging as imaging; pub use libremetaverse_imaging as imaging;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -7,5 +7,8 @@ license.workspace = true
repository.workspace = true repository.workspace = true
description = "Texture codec abstractions for the MetaCrate LibreMetaverse rewrite" description = "Texture codec abstractions for the MetaCrate LibreMetaverse rewrite"
[dependencies]
libremetaverse-types = { path = "../libremetaverse-types" }
[lints] [lints]
workspace = true workspace = true

View File

@@ -8,7 +8,7 @@ pub trait ITextureCodec {
} }
/// `enum` shim for C# `LibreMetaverse.Imaging.ImageChannels`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Imaging.ImageChannels`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ImageChannels; pub struct ImageChannels;
impl ImageChannels { impl ImageChannels {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Imaging.ImageChannels"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Imaging.ImageChannels";
@@ -16,7 +16,7 @@ impl ImageChannels {
} }
/// `class` shim for C# `LibreMetaverse.Imaging.ManagedImage`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Imaging.ManagedImage`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ManagedImage; pub struct ManagedImage;
impl ManagedImage { impl ManagedImage {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Imaging.ManagedImage"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Imaging.ManagedImage";

View File

@@ -3,3 +3,4 @@
mod generated; mod generated;
pub use generated::*; pub use generated::*;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -7,5 +7,8 @@ license.workspace = true
repository.workspace = true repository.workspace = true
description = "LSL parser-tool shims for the MetaCrate LibreMetaverse rewrite" description = "LSL parser-tool shims for the MetaCrate LibreMetaverse rewrite"
[dependencies]
libremetaverse-types = { path = "../libremetaverse-types" }
[lints] [lints]
workspace = true workspace = true

File diff suppressed because it is too large Load Diff

View File

@@ -3,3 +3,4 @@
mod generated; mod generated;
pub use generated::*; pub use generated::*;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -9,6 +9,7 @@ description = "Primitive meshing shims for the MetaCrate LibreMetaverse rewrite"
[dependencies] [dependencies]
libremetaverse-imaging = { path = "../libremetaverse-imaging" } libremetaverse-imaging = { path = "../libremetaverse-imaging" }
libremetaverse-types = { path = "../libremetaverse-types" }
[lints] [lints]
workspace = true workspace = true

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `struct` shim for C# `LibreMetaverse.PrimMesher.Coord`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.PrimMesher.Coord`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Coord; pub struct Coord;
impl Coord { impl Coord {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Coord"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Coord";
@@ -11,7 +11,7 @@ impl Coord {
} }
/// `struct` shim for C# `LibreMetaverse.PrimMesher.Face`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.PrimMesher.Face`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Face; pub struct Face;
impl Face { impl Face {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Face"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Face";
@@ -19,7 +19,7 @@ impl Face {
} }
/// `class` shim for C# `LibreMetaverse.PrimMesher.ObjMesh`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.PrimMesher.ObjMesh`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ObjMesh; pub struct ObjMesh;
impl ObjMesh { impl ObjMesh {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.ObjMesh"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.ObjMesh";
@@ -27,7 +27,7 @@ impl ObjMesh {
} }
/// `class` shim for C# `LibreMetaverse.PrimMesher.Path`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.PrimMesher.Path`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Path; pub struct Path;
impl Path { impl Path {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Path"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Path";
@@ -35,7 +35,7 @@ impl Path {
} }
/// `struct` shim for C# `LibreMetaverse.PrimMesher.PathNode`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.PrimMesher.PathNode`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PathNode; pub struct PathNode;
impl PathNode { impl PathNode {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.PathNode"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.PathNode";
@@ -43,7 +43,7 @@ impl PathNode {
} }
/// `enum` shim for C# `LibreMetaverse.PrimMesher.PathType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.PrimMesher.PathType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PathType; pub struct PathType;
impl PathType { impl PathType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.PathType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.PathType";
@@ -51,7 +51,7 @@ impl PathType {
} }
/// `class` shim for C# `LibreMetaverse.PrimMesher.PrimMesh`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.PrimMesher.PrimMesh`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PrimMesh; pub struct PrimMesh;
impl PrimMesh { impl PrimMesh {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.PrimMesh"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.PrimMesh";
@@ -59,7 +59,7 @@ impl PrimMesh {
} }
/// `class` shim for C# `LibreMetaverse.PrimMesher.Profile`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.PrimMesher.Profile`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Profile; pub struct Profile;
impl Profile { impl Profile {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Profile"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Profile";
@@ -67,7 +67,7 @@ impl Profile {
} }
/// `struct` shim for C# `LibreMetaverse.PrimMesher.Quat`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.PrimMesher.Quat`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Quat; pub struct Quat;
impl Quat { impl Quat {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Quat"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.Quat";
@@ -75,7 +75,7 @@ impl Quat {
} }
/// `class` shim for C# `LibreMetaverse.PrimMesher.SculptMap`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.PrimMesher.SculptMap`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SculptMap; pub struct SculptMap;
impl SculptMap { impl SculptMap {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.SculptMap"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.SculptMap";
@@ -83,7 +83,7 @@ impl SculptMap {
} }
/// `class` shim for C# `LibreMetaverse.PrimMesher.SculptMesh`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.PrimMesher.SculptMesh`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SculptMesh; pub struct SculptMesh;
impl SculptMesh { impl SculptMesh {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.SculptMesh"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.SculptMesh";
@@ -91,7 +91,7 @@ impl SculptMesh {
} }
/// `enum` shim for C# `LibreMetaverse.PrimMesher.SculptType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.PrimMesher.SculptType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SculptType; pub struct SculptType;
impl SculptType { impl SculptType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.SculptType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.SculptType";
@@ -99,7 +99,7 @@ impl SculptType {
} }
/// `struct` shim for C# `LibreMetaverse.PrimMesher.UVCoord`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.PrimMesher.UVCoord`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct UVCoord; pub struct UVCoord;
impl UVCoord { impl UVCoord {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.UVCoord"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.UVCoord";
@@ -107,7 +107,7 @@ impl UVCoord {
} }
/// `class` shim for C# `LibreMetaverse.PrimMesher.VertexIndexer`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.PrimMesher.VertexIndexer`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VertexIndexer; pub struct VertexIndexer;
impl VertexIndexer { impl VertexIndexer {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.VertexIndexer"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.VertexIndexer";
@@ -115,7 +115,7 @@ impl VertexIndexer {
} }
/// `struct` shim for C# `LibreMetaverse.PrimMesher.ViewerFace`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.PrimMesher.ViewerFace`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ViewerFace; pub struct ViewerFace;
impl ViewerFace { impl ViewerFace {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.ViewerFace"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.ViewerFace";
@@ -123,7 +123,7 @@ impl ViewerFace {
} }
/// `struct` shim for C# `LibreMetaverse.PrimMesher.ViewerPolygon`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.PrimMesher.ViewerPolygon`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ViewerPolygon; pub struct ViewerPolygon;
impl ViewerPolygon { impl ViewerPolygon {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.ViewerPolygon"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.ViewerPolygon";
@@ -131,7 +131,7 @@ impl ViewerPolygon {
} }
/// `struct` shim for C# `LibreMetaverse.PrimMesher.ViewerVertex`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.PrimMesher.ViewerVertex`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ViewerVertex; pub struct ViewerVertex;
impl ViewerVertex { impl ViewerVertex {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.ViewerVertex"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimMesher.ViewerVertex";

View File

@@ -4,3 +4,4 @@ mod generated;
pub use generated::*; pub use generated::*;
pub use libremetaverse_imaging as imaging; pub use libremetaverse_imaging as imaging;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `class` shim for C# `LibreMetaverse.Rendering.MeshFoundry`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Rendering.MeshFoundry`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MeshFoundry; pub struct MeshFoundry;
impl MeshFoundry { impl MeshFoundry {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Rendering.MeshFoundry"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Rendering.MeshFoundry";

View File

@@ -8,3 +8,4 @@ pub use libremetaverse_imaging as imaging;
pub use libremetaverse_prim_mesher as prim_mesher; pub use libremetaverse_prim_mesher as prim_mesher;
pub use libremetaverse_structured_data as structured_data; pub use libremetaverse_structured_data as structured_data;
pub use libremetaverse_types as types; pub use libremetaverse_types as types;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `class` shim for C# `LibreMetaverse.Rendering.SimpleRenderer`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Rendering.SimpleRenderer`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SimpleRenderer; pub struct SimpleRenderer;
impl SimpleRenderer { impl SimpleRenderer {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Rendering.SimpleRenderer"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Rendering.SimpleRenderer";

View File

@@ -5,3 +5,4 @@ mod generated;
pub use generated::*; pub use generated::*;
pub use libremetaverse as core; pub use libremetaverse as core;
pub use libremetaverse_types as types; pub use libremetaverse_types as types;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -7,5 +7,8 @@ license.workspace = true
repository.workspace = true repository.workspace = true
description = "RLV protocol shims for the MetaCrate LibreMetaverse rewrite" description = "RLV protocol shims for the MetaCrate LibreMetaverse rewrite"
[dependencies]
libremetaverse-types = { path = "../libremetaverse-types" }
[lints] [lints]
workspace = true workspace = true

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `class` shim for C# `LibreMetaverse.RLV.AttachmentRequest`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.AttachmentRequest`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AttachmentRequest; pub struct AttachmentRequest;
impl AttachmentRequest { impl AttachmentRequest {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.AttachmentRequest"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.AttachmentRequest";
@@ -11,7 +11,7 @@ impl AttachmentRequest {
} }
/// `class` shim for C# `LibreMetaverse.RLV.CameraRestrictions`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.CameraRestrictions`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct CameraRestrictions; pub struct CameraRestrictions;
impl CameraRestrictions { impl CameraRestrictions {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.CameraRestrictions"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.CameraRestrictions";
@@ -19,7 +19,7 @@ impl CameraRestrictions {
} }
/// `class` shim for C# `LibreMetaverse.RLV.CameraSettings`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.CameraSettings`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct CameraSettings; pub struct CameraSettings;
impl CameraSettings { impl CameraSettings {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.CameraSettings"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.CameraSettings";
@@ -27,7 +27,7 @@ impl CameraSettings {
} }
/// `enum` shim for C# `LibreMetaverse.RLV.HoverTextLocation`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.RLV.HoverTextLocation`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct HoverTextLocation; pub struct HoverTextLocation;
impl HoverTextLocation { impl HoverTextLocation {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.HoverTextLocation"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.HoverTextLocation";
@@ -45,7 +45,7 @@ pub trait IRlvQueryCallbacks {
} }
/// `class` shim for C# `LibreMetaverse.RLV.InventoryMap`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.InventoryMap`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct InventoryMap; pub struct InventoryMap;
impl InventoryMap { impl InventoryMap {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.InventoryMap"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.InventoryMap";
@@ -53,7 +53,7 @@ impl InventoryMap {
} }
/// `class` shim for C# `LibreMetaverse.RLV.LockedFolderPublic`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.LockedFolderPublic`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct LockedFolderPublic; pub struct LockedFolderPublic;
impl LockedFolderPublic { impl LockedFolderPublic {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.LockedFolderPublic"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.LockedFolderPublic";
@@ -61,7 +61,7 @@ impl LockedFolderPublic {
} }
/// `enum` shim for C# `LibreMetaverse.RLV.ObjectLocation`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.RLV.ObjectLocation`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ObjectLocation; pub struct ObjectLocation;
impl ObjectLocation { impl ObjectLocation {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.ObjectLocation"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.ObjectLocation";
@@ -69,7 +69,7 @@ impl ObjectLocation {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvActionCallbacksDefault`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvActionCallbacksDefault`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvActionCallbacksDefault; pub struct RlvActionCallbacksDefault;
impl RlvActionCallbacksDefault { impl RlvActionCallbacksDefault {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvActionCallbacksDefault"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvActionCallbacksDefault";
@@ -77,7 +77,7 @@ impl RlvActionCallbacksDefault {
} }
/// `enum` shim for C# `LibreMetaverse.RLV.RlvAttachmentPoint`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.RLV.RlvAttachmentPoint`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvAttachmentPoint; pub struct RlvAttachmentPoint;
impl RlvAttachmentPoint { impl RlvAttachmentPoint {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvAttachmentPoint"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvAttachmentPoint";
@@ -85,7 +85,7 @@ impl RlvAttachmentPoint {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvBlacklist`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvBlacklist`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvBlacklist; pub struct RlvBlacklist;
impl RlvBlacklist { impl RlvBlacklist {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvBlacklist"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvBlacklist";
@@ -93,7 +93,7 @@ impl RlvBlacklist {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvCallbacksDefault`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvCallbacksDefault`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvCallbacksDefault; pub struct RlvCallbacksDefault;
impl RlvCallbacksDefault { impl RlvCallbacksDefault {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvCallbacksDefault"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvCallbacksDefault";
@@ -101,7 +101,7 @@ impl RlvCallbacksDefault {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvCommandProcessor`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvCommandProcessor`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvCommandProcessor; pub struct RlvCommandProcessor;
impl RlvCommandProcessor { impl RlvCommandProcessor {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvCommandProcessor"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvCommandProcessor";
@@ -109,7 +109,7 @@ impl RlvCommandProcessor {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvCommon`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvCommon`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvCommon; pub struct RlvCommon;
impl RlvCommon { impl RlvCommon {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvCommon"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvCommon";
@@ -117,7 +117,7 @@ impl RlvCommon {
} }
/// `enum` shim for C# `LibreMetaverse.RLV.RlvGestureState`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.RLV.RlvGestureState`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvGestureState; pub struct RlvGestureState;
impl RlvGestureState { impl RlvGestureState {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvGestureState"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvGestureState";
@@ -125,7 +125,7 @@ impl RlvGestureState {
} }
/// `enum` shim for C# `LibreMetaverse.RLV.RlvGetDebugType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.RLV.RlvGetDebugType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvGetDebugType; pub struct RlvGetDebugType;
impl RlvGetDebugType { impl RlvGetDebugType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvGetDebugType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvGetDebugType";
@@ -133,7 +133,7 @@ impl RlvGetDebugType {
} }
/// `enum` shim for C# `LibreMetaverse.RLV.RlvGetEnvType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.RLV.RlvGetEnvType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvGetEnvType; pub struct RlvGetEnvType;
impl RlvGetEnvType { impl RlvGetEnvType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvGetEnvType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvGetEnvType";
@@ -141,7 +141,7 @@ impl RlvGetEnvType {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvInventoryItem`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvInventoryItem`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvInventoryItem; pub struct RlvInventoryItem;
impl RlvInventoryItem { impl RlvInventoryItem {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvInventoryItem"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvInventoryItem";
@@ -149,7 +149,7 @@ impl RlvInventoryItem {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvPermissionsService`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvPermissionsService`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvPermissionsService; pub struct RlvPermissionsService;
impl RlvPermissionsService { impl RlvPermissionsService {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvPermissionsService"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvPermissionsService";
@@ -157,7 +157,7 @@ impl RlvPermissionsService {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvRestriction`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvRestriction`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvRestriction; pub struct RlvRestriction;
impl RlvRestriction { impl RlvRestriction {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvRestriction"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvRestriction";
@@ -165,7 +165,7 @@ impl RlvRestriction {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvRestrictionManager`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvRestrictionManager`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvRestrictionManager; pub struct RlvRestrictionManager;
impl RlvRestrictionManager { impl RlvRestrictionManager {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvRestrictionManager"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvRestrictionManager";
@@ -173,7 +173,7 @@ impl RlvRestrictionManager {
} }
/// `enum` shim for C# `LibreMetaverse.RLV.RlvRestrictionType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.RLV.RlvRestrictionType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvRestrictionType; pub struct RlvRestrictionType;
impl RlvRestrictionType { impl RlvRestrictionType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvRestrictionType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvRestrictionType";
@@ -181,7 +181,7 @@ impl RlvRestrictionType {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvService`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvService`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvService; pub struct RlvService;
impl RlvService { impl RlvService {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvService"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvService";
@@ -189,7 +189,7 @@ impl RlvService {
} }
/// `class` shim for C# `LibreMetaverse.RLV.RlvSharedFolder`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.RlvSharedFolder`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvSharedFolder; pub struct RlvSharedFolder;
impl RlvSharedFolder { impl RlvSharedFolder {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvSharedFolder"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvSharedFolder";
@@ -197,7 +197,7 @@ impl RlvSharedFolder {
} }
/// `enum` shim for C# `LibreMetaverse.RLV.RlvWearableType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.RLV.RlvWearableType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RlvWearableType; pub struct RlvWearableType;
impl RlvWearableType { impl RlvWearableType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvWearableType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.RlvWearableType";
@@ -205,7 +205,7 @@ impl RlvWearableType {
} }
/// `enum` shim for C# `LibreMetaverse.RLV.TouchLocation`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.RLV.TouchLocation`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct TouchLocation; pub struct TouchLocation;
impl TouchLocation { impl TouchLocation {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.TouchLocation"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.RLV.TouchLocation";
@@ -214,7 +214,7 @@ impl TouchLocation {
pub mod event_arguments { pub mod event_arguments {
/// `class` shim for C# `LibreMetaverse.RLV.EventArguments.RestrictionUpdatedEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.RLV.EventArguments.RestrictionUpdatedEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RestrictionUpdatedEventArgs; pub struct RestrictionUpdatedEventArgs;
impl RestrictionUpdatedEventArgs { impl RestrictionUpdatedEventArgs {
pub const CSHARP_NAME: &'static str = pub const CSHARP_NAME: &'static str =

View File

@@ -3,3 +3,4 @@
mod generated; mod generated;
pub use generated::*; pub use generated::*;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `class` shim for C# `LibreMetaverse.StructuredData.OSD`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSD`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSD; pub struct OSD;
impl OSD { impl OSD {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSD"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSD";
@@ -11,7 +11,7 @@ impl OSD {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDArray`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDArray`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDArray; pub struct OSDArray;
impl OSDArray { impl OSDArray {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDArray"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDArray";
@@ -19,7 +19,7 @@ impl OSDArray {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDBinary`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDBinary`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDBinary; pub struct OSDBinary;
impl OSDBinary { impl OSDBinary {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDBinary"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDBinary";
@@ -27,7 +27,7 @@ impl OSDBinary {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDBoolean`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDBoolean`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDBoolean; pub struct OSDBoolean;
impl OSDBoolean { impl OSDBoolean {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDBoolean"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDBoolean";
@@ -35,7 +35,7 @@ impl OSDBoolean {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDDate`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDDate`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDDate; pub struct OSDDate;
impl OSDDate { impl OSDDate {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDDate"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDDate";
@@ -43,7 +43,7 @@ impl OSDDate {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDException`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDException`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDException; pub struct OSDException;
impl OSDException { impl OSDException {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDException"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDException";
@@ -51,7 +51,7 @@ impl OSDException {
} }
/// `enum` shim for C# `LibreMetaverse.StructuredData.OSDFormat`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.StructuredData.OSDFormat`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDFormat; pub struct OSDFormat;
impl OSDFormat { impl OSDFormat {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDFormat"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDFormat";
@@ -59,7 +59,7 @@ impl OSDFormat {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDInteger`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDInteger`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDInteger; pub struct OSDInteger;
impl OSDInteger { impl OSDInteger {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDInteger"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDInteger";
@@ -67,7 +67,7 @@ impl OSDInteger {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDLlsdXml`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDLlsdXml`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDLlsdXml; pub struct OSDLlsdXml;
impl OSDLlsdXml { impl OSDLlsdXml {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDLlsdXml"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDLlsdXml";
@@ -75,7 +75,7 @@ impl OSDLlsdXml {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDMap`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDMap`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDMap; pub struct OSDMap;
impl OSDMap { impl OSDMap {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDMap"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDMap";
@@ -83,7 +83,7 @@ impl OSDMap {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDParser`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDParser`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDParser; pub struct OSDParser;
impl OSDParser { impl OSDParser {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDParser"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDParser";
@@ -91,7 +91,7 @@ impl OSDParser {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDReal`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDReal`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDReal; pub struct OSDReal;
impl OSDReal { impl OSDReal {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDReal"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDReal";
@@ -99,7 +99,7 @@ impl OSDReal {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDString`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDString`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDString; pub struct OSDString;
impl OSDString { impl OSDString {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDString"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDString";
@@ -107,7 +107,7 @@ impl OSDString {
} }
/// `enum` shim for C# `LibreMetaverse.StructuredData.OSDType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.StructuredData.OSDType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDType; pub struct OSDType;
impl OSDType { impl OSDType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDType";
@@ -115,7 +115,7 @@ impl OSDType {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDUUID`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDUUID`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDUUID; pub struct OSDUUID;
impl OSDUUID { impl OSDUUID {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDUUID"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDUUID";
@@ -123,7 +123,7 @@ impl OSDUUID {
} }
/// `class` shim for C# `LibreMetaverse.StructuredData.OSDUri`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.StructuredData.OSDUri`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OSDUri; pub struct OSDUri;
impl OSDUri { impl OSDUri {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDUri"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.StructuredData.OSDUri";

View File

@@ -4,3 +4,4 @@ mod generated;
pub use generated::*; pub use generated::*;
pub use libremetaverse_types as types; pub use libremetaverse_types as types;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `enum` shim for C# `LibreMetaverse.AssetType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.AssetType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AssetType; pub struct AssetType;
impl AssetType { impl AssetType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.AssetType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.AssetType";
@@ -11,7 +11,7 @@ impl AssetType {
} }
/// `enum` shim for C# `LibreMetaverse.AttachmentPoint`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.AttachmentPoint`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AttachmentPoint; pub struct AttachmentPoint;
impl AttachmentPoint { impl AttachmentPoint {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.AttachmentPoint"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.AttachmentPoint";
@@ -19,7 +19,7 @@ impl AttachmentPoint {
} }
/// `class` shim for C# `LibreMetaverse.CRC32`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.CRC32`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct CRC32; pub struct CRC32;
impl CRC32 { impl CRC32 {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.CRC32"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.CRC32";
@@ -27,7 +27,7 @@ impl CRC32 {
} }
/// `class` shim for C# `LibreMetaverse.CacheDictionary`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.CacheDictionary`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct CacheDictionary<T0 = (), T1 = ()>(std::marker::PhantomData<(T0, T1)>); pub struct CacheDictionary<T0 = (), T1 = ()>(std::marker::PhantomData<(T0, T1)>);
impl<T0, T1> CacheDictionary<T0, T1> { impl<T0, T1> CacheDictionary<T0, T1> {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.CacheDictionary"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.CacheDictionary";
@@ -35,7 +35,7 @@ impl<T0, T1> CacheDictionary<T0, T1> {
} }
/// `class` shim for C# `LibreMetaverse.CacheDictionaryEnumerator`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.CacheDictionaryEnumerator`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct CacheDictionaryEnumerator; pub struct CacheDictionaryEnumerator;
impl CacheDictionaryEnumerator { impl CacheDictionaryEnumerator {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.CacheDictionaryEnumerator"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.CacheDictionaryEnumerator";
@@ -43,7 +43,7 @@ impl CacheDictionaryEnumerator {
} }
/// `enum` shim for C# `LibreMetaverse.ClickAction`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.ClickAction`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ClickAction; pub struct ClickAction;
impl ClickAction { impl ClickAction {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.ClickAction"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.ClickAction";
@@ -51,7 +51,7 @@ impl ClickAction {
} }
/// `struct` shim for C# `LibreMetaverse.Color4`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Color4`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Color4; pub struct Color4;
impl Color4 { impl Color4 {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Color4"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Color4";
@@ -59,7 +59,7 @@ impl Color4 {
} }
/// `class` shim for C# `LibreMetaverse.DoubleDictionary`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.DoubleDictionary`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DoubleDictionary<T0 = (), T1 = (), T2 = ()>(std::marker::PhantomData<(T0, T1, T2)>); pub struct DoubleDictionary<T0 = (), T1 = (), T2 = ()>(std::marker::PhantomData<(T0, T1, T2)>);
impl<T0, T1, T2> DoubleDictionary<T0, T1, T2> { impl<T0, T1, T2> DoubleDictionary<T0, T1, T2> {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.DoubleDictionary"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.DoubleDictionary";
@@ -67,7 +67,7 @@ impl<T0, T1, T2> DoubleDictionary<T0, T1, T2> {
} }
/// `class` shim for C# `LibreMetaverse.EmptyRemovalStrategy`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.EmptyRemovalStrategy`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct EmptyRemovalStrategy<T0 = ()>(std::marker::PhantomData<(T0,)>); pub struct EmptyRemovalStrategy<T0 = ()>(std::marker::PhantomData<(T0,)>);
impl<T0> EmptyRemovalStrategy<T0> { impl<T0> EmptyRemovalStrategy<T0> {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.EmptyRemovalStrategy"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.EmptyRemovalStrategy";
@@ -75,7 +75,7 @@ impl<T0> EmptyRemovalStrategy<T0> {
} }
/// `class` shim for C# `LibreMetaverse.EnumInfoAttribute`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.EnumInfoAttribute`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct EnumInfoAttribute; pub struct EnumInfoAttribute;
impl EnumInfoAttribute { impl EnumInfoAttribute {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.EnumInfoAttribute"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.EnumInfoAttribute";
@@ -83,7 +83,7 @@ impl EnumInfoAttribute {
} }
/// `class` shim for C# `LibreMetaverse.EnumInfoExtensions`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.EnumInfoExtensions`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct EnumInfoExtensions; pub struct EnumInfoExtensions;
impl EnumInfoExtensions { impl EnumInfoExtensions {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.EnumInfoExtensions"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.EnumInfoExtensions";
@@ -91,7 +91,7 @@ impl EnumInfoExtensions {
} }
/// `class` shim for C# `LibreMetaverse.ExpiringCache`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.ExpiringCache`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ExpiringCache<T0 = (), T1 = ()>(std::marker::PhantomData<(T0, T1)>); pub struct ExpiringCache<T0 = (), T1 = ()>(std::marker::PhantomData<(T0, T1)>);
impl<T0, T1> ExpiringCache<T0, T1> { impl<T0, T1> ExpiringCache<T0, T1> {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.ExpiringCache"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.ExpiringCache";
@@ -99,7 +99,7 @@ impl<T0, T1> ExpiringCache<T0, T1> {
} }
/// `enum` shim for C# `LibreMetaverse.ExtraParamType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.ExtraParamType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ExtraParamType; pub struct ExtraParamType;
impl ExtraParamType { impl ExtraParamType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.ExtraParamType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.ExtraParamType";
@@ -107,7 +107,7 @@ impl ExtraParamType {
} }
/// `enum` shim for C# `LibreMetaverse.FaceType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.FaceType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct FaceType; pub struct FaceType;
impl FaceType { impl FaceType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.FaceType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.FaceType";
@@ -115,7 +115,7 @@ impl FaceType {
} }
/// `enum` shim for C# `LibreMetaverse.FolderType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.FolderType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct FolderType; pub struct FolderType;
impl FolderType { impl FolderType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.FolderType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.FolderType";
@@ -123,7 +123,7 @@ impl FolderType {
} }
/// `enum` shim for C# `LibreMetaverse.HoleType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.HoleType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct HoleType; pub struct HoleType;
impl HoleType { impl HoleType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.HoleType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.HoleType";
@@ -136,7 +136,7 @@ pub trait ICacheDictionaryRemovalStrategy<T0 = ()> {
} }
/// `enum` shim for C# `LibreMetaverse.InventoryType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.InventoryType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct InventoryType; pub struct InventoryType;
impl InventoryType { impl InventoryType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.InventoryType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.InventoryType";
@@ -144,7 +144,7 @@ impl InventoryType {
} }
/// `enum` shim for C# `LibreMetaverse.JointType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.JointType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct JointType; pub struct JointType;
impl JointType { impl JointType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.JointType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.JointType";
@@ -152,7 +152,7 @@ impl JointType {
} }
/// `class` shim for C# `LibreMetaverse.LruRemovalStrategy`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.LruRemovalStrategy`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct LruRemovalStrategy<T0 = ()>(std::marker::PhantomData<(T0,)>); pub struct LruRemovalStrategy<T0 = ()>(std::marker::PhantomData<(T0,)>);
impl<T0> LruRemovalStrategy<T0> { impl<T0> LruRemovalStrategy<T0> {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.LruRemovalStrategy"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.LruRemovalStrategy";
@@ -160,7 +160,7 @@ impl<T0> LruRemovalStrategy<T0> {
} }
/// `enum` shim for C# `LibreMetaverse.Material`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Material`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Material; pub struct Material;
impl Material { impl Material {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Material"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Material";
@@ -168,7 +168,7 @@ impl Material {
} }
/// `struct` shim for C# `LibreMetaverse.Matrix4`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Matrix4`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Matrix4; pub struct Matrix4;
impl Matrix4 { impl Matrix4 {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Matrix4"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Matrix4";
@@ -176,7 +176,7 @@ impl Matrix4 {
} }
/// `class` shim for C# `LibreMetaverse.MruRemovalStrategy`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.MruRemovalStrategy`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MruRemovalStrategy<T0 = ()>(std::marker::PhantomData<(T0,)>); pub struct MruRemovalStrategy<T0 = ()>(std::marker::PhantomData<(T0,)>);
impl<T0> MruRemovalStrategy<T0> { impl<T0> MruRemovalStrategy<T0> {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.MruRemovalStrategy"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.MruRemovalStrategy";
@@ -184,7 +184,7 @@ impl<T0> MruRemovalStrategy<T0> {
} }
/// `class` shim for C# `LibreMetaverse.MultiValueDictionary`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.MultiValueDictionary`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MultiValueDictionary<T0 = (), T1 = ()>(std::marker::PhantomData<(T0, T1)>); pub struct MultiValueDictionary<T0 = (), T1 = ()>(std::marker::PhantomData<(T0, T1)>);
impl<T0, T1> MultiValueDictionary<T0, T1> { impl<T0, T1> MultiValueDictionary<T0, T1> {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.MultiValueDictionary"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.MultiValueDictionary";
@@ -192,7 +192,7 @@ impl<T0, T1> MultiValueDictionary<T0, T1> {
} }
/// `enum` shim for C# `LibreMetaverse.ObjectCategory`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.ObjectCategory`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ObjectCategory; pub struct ObjectCategory;
impl ObjectCategory { impl ObjectCategory {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.ObjectCategory"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.ObjectCategory";
@@ -200,7 +200,7 @@ impl ObjectCategory {
} }
/// `enum` shim for C# `LibreMetaverse.PCode`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.PCode`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PCode; pub struct PCode;
impl PCode { impl PCode {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PCode"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PCode";
@@ -208,7 +208,7 @@ impl PCode {
} }
/// `enum` shim for C# `LibreMetaverse.PathCurve`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.PathCurve`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PathCurve; pub struct PathCurve;
impl PathCurve { impl PathCurve {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PathCurve"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PathCurve";
@@ -216,7 +216,7 @@ impl PathCurve {
} }
/// `enum` shim for C# `LibreMetaverse.PhysicsShapeType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.PhysicsShapeType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PhysicsShapeType; pub struct PhysicsShapeType;
impl PhysicsShapeType { impl PhysicsShapeType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PhysicsShapeType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PhysicsShapeType";
@@ -224,7 +224,7 @@ impl PhysicsShapeType {
} }
/// `enum` shim for C# `LibreMetaverse.Platform`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Platform`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Platform; pub struct Platform;
impl Platform { impl Platform {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Platform"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Platform";
@@ -232,7 +232,7 @@ impl Platform {
} }
/// `enum` shim for C# `LibreMetaverse.PrimFlags`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.PrimFlags`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PrimFlags; pub struct PrimFlags;
impl PrimFlags { impl PrimFlags {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimFlags"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimFlags";
@@ -240,7 +240,7 @@ impl PrimFlags {
} }
/// `enum` shim for C# `LibreMetaverse.PrimType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.PrimType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PrimType; pub struct PrimType;
impl PrimType { impl PrimType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.PrimType";
@@ -248,7 +248,7 @@ impl PrimType {
} }
/// `enum` shim for C# `LibreMetaverse.ProfileCurve`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.ProfileCurve`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ProfileCurve; pub struct ProfileCurve;
impl ProfileCurve { impl ProfileCurve {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.ProfileCurve"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.ProfileCurve";
@@ -256,7 +256,7 @@ impl ProfileCurve {
} }
/// `struct` shim for C# `LibreMetaverse.Quaternion`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Quaternion`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Quaternion; pub struct Quaternion;
impl Quaternion { impl Quaternion {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Quaternion"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Quaternion";
@@ -264,7 +264,7 @@ impl Quaternion {
} }
/// `struct` shim for C# `LibreMetaverse.Ray`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Ray`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Ray; pub struct Ray;
impl Ray { impl Ray {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Ray"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Ray";
@@ -272,7 +272,7 @@ impl Ray {
} }
/// `enum` shim for C# `LibreMetaverse.SaleType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.SaleType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SaleType; pub struct SaleType;
impl SaleType { impl SaleType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.SaleType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.SaleType";
@@ -280,7 +280,7 @@ impl SaleType {
} }
/// `enum` shim for C# `LibreMetaverse.SculptType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.SculptType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SculptType; pub struct SculptType;
impl SculptType { impl SculptType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.SculptType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.SculptType";
@@ -288,7 +288,7 @@ impl SculptType {
} }
/// `enum` shim for C# `LibreMetaverse.SoundFlags`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.SoundFlags`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SoundFlags; pub struct SoundFlags;
impl SoundFlags { impl SoundFlags {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.SoundFlags"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.SoundFlags";
@@ -296,7 +296,7 @@ impl SoundFlags {
} }
/// `class` shim for C# `LibreMetaverse.TokenBucket`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.TokenBucket`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct TokenBucket; pub struct TokenBucket;
impl TokenBucket { impl TokenBucket {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.TokenBucket"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.TokenBucket";
@@ -304,7 +304,7 @@ impl TokenBucket {
} }
/// `record struct` shim for C# `LibreMetaverse.UUID`; members remain intentionally unimplemented. /// `record struct` shim for C# `LibreMetaverse.UUID`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct UUID; pub struct UUID;
impl UUID { impl UUID {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.UUID"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.UUID";
@@ -312,7 +312,7 @@ impl UUID {
} }
/// `class` shim for C# `LibreMetaverse.Utils`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Utils`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Utils; pub struct Utils;
impl Utils { impl Utils {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Utils"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Utils";
@@ -320,7 +320,7 @@ impl Utils {
} }
/// `struct` shim for C# `LibreMetaverse.Vector2`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Vector2`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Vector2; pub struct Vector2;
impl Vector2 { impl Vector2 {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Vector2"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Vector2";
@@ -328,7 +328,7 @@ impl Vector2 {
} }
/// `struct` shim for C# `LibreMetaverse.Vector3`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Vector3`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Vector3; pub struct Vector3;
impl Vector3 { impl Vector3 {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Vector3"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Vector3";
@@ -336,7 +336,7 @@ impl Vector3 {
} }
/// `struct` shim for C# `LibreMetaverse.Vector3d`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Vector3d`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Vector3d; pub struct Vector3d;
impl Vector3d { impl Vector3d {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Vector3d"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Vector3d";
@@ -344,7 +344,7 @@ impl Vector3d {
} }
/// `struct` shim for C# `LibreMetaverse.Vector4`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Vector4`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Vector4; pub struct Vector4;
impl Vector4 { impl Vector4 {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Vector4"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Vector4";
@@ -352,7 +352,7 @@ impl Vector4 {
} }
/// `enum` shim for C# `LibreMetaverse.WearableType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.WearableType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WearableType; pub struct WearableType;
impl WearableType { impl WearableType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.WearableType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.WearableType";

View File

@@ -1,5 +1,8 @@
//! Core value types corresponding to `LibreMetaverse.Types`. //! Core value types corresponding to `LibreMetaverse.Types`.
mod generated; mod generated;
pub mod shim;
pub use generated::*; pub use generated::*;
pub use shim::NotImplemented as Error;
pub use shim::{NotImplemented, not_implemented};

View File

@@ -0,0 +1,107 @@
//! Failure-only infrastructure for callable API shims.
//!
//! Fallible synchronous and asynchronous members return [`NotImplemented`].
//! Infallible members, trait methods, and constructors use
//! [`unimplemented_api!`](crate::unimplemented_api). Stream and callback
//! factories fail before returning a stream, registering a callback, or storing
//! a trait object; an empty stream or no-op callback would be plausible behavior.
use std::fmt;
const PANIC_PREFIX: &str = "unimplemented C# API member: ";
/// Typed failure returned by a fallible API shim.
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct NotImplemented {
csharp_member: &'static str,
}
impl NotImplemented {
/// Creates a failure for one stable C# documentation ID.
#[must_use]
pub const fn new(csharp_member: &'static str) -> Self {
Self { csharp_member }
}
/// Returns the stable C# documentation ID of the unimplemented member.
#[must_use]
pub const fn csharp_member(self) -> &'static str {
self.csharp_member
}
}
impl fmt::Display for NotImplemented {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
formatter,
"C# API member {} is not implemented",
self.csharp_member
)
}
}
impl std::error::Error for NotImplemented {}
/// Returns the standardized typed failure without constructing a fake value.
///
/// # Errors
///
/// Always returns [`NotImplemented`] with the supplied stable C# member ID.
pub const fn not_implemented<T>(csharp_member: &'static str) -> Result<T, NotImplemented> {
Err(NotImplemented::new(csharp_member))
}
/// Panics for an infallible API whose signature cannot return [`NotImplemented`].
///
/// # Panics
///
/// Always, with a marker and the stable C# member ID.
#[doc(hidden)]
#[cold]
#[track_caller]
pub fn panic_unimplemented(csharp_member: &'static str) -> ! {
panic!("{PANIC_PREFIX}{csharp_member}")
}
/// Fails an infallible API shim with its stable C# documentation ID.
///
/// This is deliberately a panic rather than a default value. Translated tests
/// expecting a domain error therefore cannot mistake an unimplemented API for
/// the expected `Err` variant.
///
/// # Panics
///
/// Always, with the supplied stable C# member ID.
#[macro_export]
macro_rules! unimplemented_api {
($csharp_member:expr $(,)?) => {{ $crate::shim::panic_unimplemented($csharp_member) }};
}
#[cfg(test)]
mod tests {
use super::{NotImplemented, PANIC_PREFIX, not_implemented};
const MEMBER: &str = "M:LibreMetaverse.GridClient.Login(System.String)";
#[test]
fn error_formats_and_preserves_member_id() {
let error = NotImplemented::new(MEMBER);
assert_eq!(error.csharp_member(), MEMBER);
assert_eq!(
error.to_string(),
format!("C# API member {MEMBER} is not implemented")
);
assert_eq!(not_implemented::<bool>(MEMBER), Err(error));
}
#[test]
fn panic_placeholder_is_not_an_expected_error_result() {
let panic = std::panic::catch_unwind(|| crate::unimplemented_api!(MEMBER))
.expect_err("the infallible placeholder must panic");
let message = panic
.downcast_ref::<String>()
.expect("placeholder panic must retain its visible marker");
assert_eq!(message, &format!("{PANIC_PREFIX}{MEMBER}"));
assert!(not_implemented::<()>(MEMBER).is_err());
}
}

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `class` shim for C# `LibreMetaverse.Utilities.ConnectionManager`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Utilities.ConnectionManager`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ConnectionManager; pub struct ConnectionManager;
impl ConnectionManager { impl ConnectionManager {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Utilities.ConnectionManager"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Utilities.ConnectionManager";
@@ -11,7 +11,7 @@ impl ConnectionManager {
} }
/// `class` shim for C# `LibreMetaverse.Utilities.Realism`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Utilities.Realism`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Realism; pub struct Realism;
impl Realism { impl Realism {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Utilities.Realism"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Utilities.Realism";
@@ -19,7 +19,7 @@ impl Realism {
} }
/// `enum` shim for C# `LibreMetaverse.Utilities.WaterType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Utilities.WaterType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WaterType; pub struct WaterType;
impl WaterType { impl WaterType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Utilities.WaterType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Utilities.WaterType";

View File

@@ -6,3 +6,4 @@ pub use generated::*;
pub use libremetaverse as core; pub use libremetaverse as core;
pub use libremetaverse_structured_data as structured_data; pub use libremetaverse_structured_data as structured_data;
pub use libremetaverse_types as types; pub use libremetaverse_types as types;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.AccountLoginStateChangeEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.AccountLoginStateChangeEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AccountLoginStateChangeEventArgs; pub struct AccountLoginStateChangeEventArgs;
impl AccountLoginStateChangeEventArgs { impl AccountLoginStateChangeEventArgs {
pub const CSHARP_NAME: &'static str = pub const CSHARP_NAME: &'static str =
@@ -12,7 +12,7 @@ impl AccountLoginStateChangeEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.AudioPropertiesEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.AudioPropertiesEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AudioPropertiesEventArgs; pub struct AudioPropertiesEventArgs;
impl AudioPropertiesEventArgs { impl AudioPropertiesEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.AudioPropertiesEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.AudioPropertiesEventArgs";
@@ -20,7 +20,7 @@ impl AudioPropertiesEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.CaptureDevice`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.CaptureDevice`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct CaptureDevice; pub struct CaptureDevice;
impl CaptureDevice { impl CaptureDevice {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.CaptureDevice"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.CaptureDevice";
@@ -28,7 +28,7 @@ impl CaptureDevice {
} }
/// `enum` shim for C# `LibreMetaverse.Voice.Vivox.ConnectionState`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Voice.Vivox.ConnectionState`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ConnectionState; pub struct ConnectionState;
impl ConnectionState { impl ConnectionState {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ConnectionState"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ConnectionState";
@@ -36,7 +36,7 @@ impl ConnectionState {
} }
/// `enum` shim for C# `LibreMetaverse.Voice.Vivox.LoginState`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Voice.Vivox.LoginState`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct LoginState; pub struct LoginState;
impl LoginState { impl LoginState {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.LoginState"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.LoginState";
@@ -44,7 +44,7 @@ impl LoginState {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.NewSessionEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.NewSessionEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NewSessionEventArgs; pub struct NewSessionEventArgs;
impl NewSessionEventArgs { impl NewSessionEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.NewSessionEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.NewSessionEventArgs";
@@ -52,7 +52,7 @@ impl NewSessionEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantAddedEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantAddedEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ParticipantAddedEventArgs; pub struct ParticipantAddedEventArgs;
impl ParticipantAddedEventArgs { impl ParticipantAddedEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantAddedEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantAddedEventArgs";
@@ -60,7 +60,7 @@ impl ParticipantAddedEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantPropertiesEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantPropertiesEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ParticipantPropertiesEventArgs; pub struct ParticipantPropertiesEventArgs;
impl ParticipantPropertiesEventArgs { impl ParticipantPropertiesEventArgs {
pub const CSHARP_NAME: &'static str = pub const CSHARP_NAME: &'static str =
@@ -69,7 +69,7 @@ impl ParticipantPropertiesEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantRemovedEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantRemovedEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ParticipantRemovedEventArgs; pub struct ParticipantRemovedEventArgs;
impl ParticipantRemovedEventArgs { impl ParticipantRemovedEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantRemovedEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantRemovedEventArgs";
@@ -77,7 +77,7 @@ impl ParticipantRemovedEventArgs {
} }
/// `enum` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantState`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantState`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ParticipantState; pub struct ParticipantState;
impl ParticipantState { impl ParticipantState {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantState"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantState";
@@ -85,7 +85,7 @@ impl ParticipantState {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantStateChangeEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantStateChangeEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ParticipantStateChangeEventArgs; pub struct ParticipantStateChangeEventArgs;
impl ParticipantStateChangeEventArgs { impl ParticipantStateChangeEventArgs {
pub const CSHARP_NAME: &'static str = pub const CSHARP_NAME: &'static str =
@@ -94,7 +94,7 @@ impl ParticipantStateChangeEventArgs {
} }
/// `enum` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ParticipantType; pub struct ParticipantType;
impl ParticipantType { impl ParticipantType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantType";
@@ -102,7 +102,7 @@ impl ParticipantType {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantUpdatedEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.ParticipantUpdatedEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ParticipantUpdatedEventArgs; pub struct ParticipantUpdatedEventArgs;
impl ParticipantUpdatedEventArgs { impl ParticipantUpdatedEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantUpdatedEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ParticipantUpdatedEventArgs";
@@ -110,7 +110,7 @@ impl ParticipantUpdatedEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.RenderDevice`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.RenderDevice`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RenderDevice; pub struct RenderDevice;
impl RenderDevice { impl RenderDevice {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.RenderDevice"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.RenderDevice";
@@ -118,7 +118,7 @@ impl RenderDevice {
} }
/// `enum` shim for C# `LibreMetaverse.Voice.Vivox.ResponseType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Voice.Vivox.ResponseType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ResponseType; pub struct ResponseType;
impl ResponseType { impl ResponseType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ResponseType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.ResponseType";
@@ -126,7 +126,7 @@ impl ResponseType {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionAddedEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionAddedEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SessionAddedEventArgs; pub struct SessionAddedEventArgs;
impl SessionAddedEventArgs { impl SessionAddedEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionAddedEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionAddedEventArgs";
@@ -134,7 +134,7 @@ impl SessionAddedEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionGroupAddedEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionGroupAddedEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SessionGroupAddedEventArgs; pub struct SessionGroupAddedEventArgs;
impl SessionGroupAddedEventArgs { impl SessionGroupAddedEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionGroupAddedEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionGroupAddedEventArgs";
@@ -142,7 +142,7 @@ impl SessionGroupAddedEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionMediaEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionMediaEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SessionMediaEventArgs; pub struct SessionMediaEventArgs;
impl SessionMediaEventArgs { impl SessionMediaEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionMediaEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionMediaEventArgs";
@@ -150,7 +150,7 @@ impl SessionMediaEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionRemovedEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionRemovedEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SessionRemovedEventArgs; pub struct SessionRemovedEventArgs;
impl SessionRemovedEventArgs { impl SessionRemovedEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionRemovedEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionRemovedEventArgs";
@@ -158,7 +158,7 @@ impl SessionRemovedEventArgs {
} }
/// `enum` shim for C# `LibreMetaverse.Voice.Vivox.SessionState`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Voice.Vivox.SessionState`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SessionState; pub struct SessionState;
impl SessionState { impl SessionState {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionState"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionState";
@@ -166,7 +166,7 @@ impl SessionState {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionStateChangeEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionStateChangeEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SessionStateChangeEventArgs; pub struct SessionStateChangeEventArgs;
impl SessionStateChangeEventArgs { impl SessionStateChangeEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionStateChangeEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionStateChangeEventArgs";
@@ -174,7 +174,7 @@ impl SessionStateChangeEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionUpdatedEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.SessionUpdatedEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct SessionUpdatedEventArgs; pub struct SessionUpdatedEventArgs;
impl SessionUpdatedEventArgs { impl SessionUpdatedEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionUpdatedEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.SessionUpdatedEventArgs";
@@ -182,7 +182,7 @@ impl SessionUpdatedEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.TCPPipe`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.TCPPipe`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct TCPPipe; pub struct TCPPipe;
impl TCPPipe { impl TCPPipe {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.TCPPipe"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.TCPPipe";
@@ -190,7 +190,7 @@ impl TCPPipe {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceAccountEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceAccountEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceAccountEventArgs; pub struct VoiceAccountEventArgs;
impl VoiceAccountEventArgs { impl VoiceAccountEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceAccountEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceAccountEventArgs";
@@ -198,7 +198,7 @@ impl VoiceAccountEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceConnectorEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceConnectorEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceConnectorEventArgs; pub struct VoiceConnectorEventArgs;
impl VoiceConnectorEventArgs { impl VoiceConnectorEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceConnectorEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceConnectorEventArgs";
@@ -206,7 +206,7 @@ impl VoiceConnectorEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceDevicesEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceDevicesEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceDevicesEventArgs; pub struct VoiceDevicesEventArgs;
impl VoiceDevicesEventArgs { impl VoiceDevicesEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceDevicesEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceDevicesEventArgs";
@@ -214,7 +214,7 @@ impl VoiceDevicesEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceEvent`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceEvent`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceEvent; pub struct VoiceEvent;
impl VoiceEvent { impl VoiceEvent {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceEvent"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceEvent";
@@ -222,7 +222,7 @@ impl VoiceEvent {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceGateway`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceGateway`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceGateway; pub struct VoiceGateway;
impl VoiceGateway { impl VoiceGateway {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceGateway"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceGateway";
@@ -230,7 +230,7 @@ impl VoiceGateway {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceInputXml`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceInputXml`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceInputXml; pub struct VoiceInputXml;
impl VoiceInputXml { impl VoiceInputXml {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceInputXml"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceInputXml";
@@ -238,7 +238,7 @@ impl VoiceInputXml {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceLoggingSettings`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceLoggingSettings`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceLoggingSettings; pub struct VoiceLoggingSettings;
impl VoiceLoggingSettings { impl VoiceLoggingSettings {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceLoggingSettings"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceLoggingSettings";
@@ -246,7 +246,7 @@ impl VoiceLoggingSettings {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceManager`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceManager`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceManager; pub struct VoiceManager;
impl VoiceManager { impl VoiceManager {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceManager"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceManager";
@@ -254,7 +254,7 @@ impl VoiceManager {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceParticipant`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceParticipant`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceParticipant; pub struct VoiceParticipant;
impl VoiceParticipant { impl VoiceParticipant {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceParticipant"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceParticipant";
@@ -262,7 +262,7 @@ impl VoiceParticipant {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoicePosition`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoicePosition`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoicePosition; pub struct VoicePosition;
impl VoicePosition { impl VoicePosition {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoicePosition"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoicePosition";
@@ -270,7 +270,7 @@ impl VoicePosition {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceRequest`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceRequest`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceRequest; pub struct VoiceRequest;
impl VoiceRequest { impl VoiceRequest {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceRequest"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceRequest";
@@ -278,7 +278,7 @@ impl VoiceRequest {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceResponse`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceResponse`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceResponse; pub struct VoiceResponse;
impl VoiceResponse { impl VoiceResponse {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceResponse"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceResponse";
@@ -286,7 +286,7 @@ impl VoiceResponse {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceResponseEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceResponseEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceResponseEventArgs; pub struct VoiceResponseEventArgs;
impl VoiceResponseEventArgs { impl VoiceResponseEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceResponseEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceResponseEventArgs";
@@ -294,7 +294,7 @@ impl VoiceResponseEventArgs {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceResponseResults`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceResponseResults`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceResponseResults; pub struct VoiceResponseResults;
impl VoiceResponseResults { impl VoiceResponseResults {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceResponseResults"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceResponseResults";
@@ -302,7 +302,7 @@ impl VoiceResponseResults {
} }
/// `enum` shim for C# `LibreMetaverse.Voice.Vivox.VoiceServiceType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Voice.Vivox.VoiceServiceType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceServiceType; pub struct VoiceServiceType;
impl VoiceServiceType { impl VoiceServiceType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceServiceType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceServiceType";
@@ -310,7 +310,7 @@ impl VoiceServiceType {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceSession`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceSession`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceSession; pub struct VoiceSession;
impl VoiceSession { impl VoiceSession {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceSession"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceSession";
@@ -318,7 +318,7 @@ impl VoiceSession {
} }
/// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceSessionEventArgs`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.Vivox.VoiceSessionEventArgs`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceSessionEventArgs; pub struct VoiceSessionEventArgs;
impl VoiceSessionEventArgs { impl VoiceSessionEventArgs {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceSessionEventArgs"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceSessionEventArgs";
@@ -326,7 +326,7 @@ impl VoiceSessionEventArgs {
} }
/// `enum` shim for C# `LibreMetaverse.Voice.Vivox.VoiceStatus`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Voice.Vivox.VoiceStatus`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceStatus; pub struct VoiceStatus;
impl VoiceStatus { impl VoiceStatus {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceStatus"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.VoiceStatus";
@@ -334,7 +334,7 @@ impl VoiceStatus {
} }
/// `delegate` shim for C# `LibreMetaverse.Voice.Vivox.void`; members remain intentionally unimplemented. /// `delegate` shim for C# `LibreMetaverse.Voice.Vivox.void`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct void; pub struct void;
impl void { impl void {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.void"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.Vivox.void";

View File

@@ -6,3 +6,4 @@ pub use generated::*;
pub use libremetaverse as core; pub use libremetaverse as core;
pub use libremetaverse_structured_data as structured_data; pub use libremetaverse_structured_data as structured_data;
pub use libremetaverse_types as types; pub use libremetaverse_types as types;
pub use libremetaverse_types::NotImplemented as Error;

View File

@@ -10,6 +10,7 @@ description = "WebRTC voice shims for the MetaCrate LibreMetaverse rewrite"
[dependencies] [dependencies]
libremetaverse = { path = "../libremetaverse" } libremetaverse = { path = "../libremetaverse" }
libremetaverse-structured-data = { path = "../libremetaverse-structured-data" } libremetaverse-structured-data = { path = "../libremetaverse-structured-data" }
libremetaverse-types = { path = "../libremetaverse-types" }
[lints] [lints]
workspace = true workspace = true

View File

@@ -3,7 +3,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
/// `class` shim for C# `LibreMetaverse.Voice.WebRTC.AvatarPosition`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.WebRTC.AvatarPosition`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AvatarPosition; pub struct AvatarPosition;
impl AvatarPosition { impl AvatarPosition {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.AvatarPosition"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.AvatarPosition";
@@ -11,7 +11,7 @@ impl AvatarPosition {
} }
/// `enum` shim for C# `LibreMetaverse.Voice.WebRTC.ESessionType`; members remain intentionally unimplemented. /// `enum` shim for C# `LibreMetaverse.Voice.WebRTC.ESessionType`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ESessionType; pub struct ESessionType;
impl ESessionType { impl ESessionType {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.ESessionType"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.ESessionType";
@@ -24,7 +24,7 @@ pub trait IVoiceLogger {
} }
/// `struct` shim for C# `LibreMetaverse.Voice.WebRTC.Int3`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Voice.WebRTC.Int3`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Int3; pub struct Int3;
impl Int3 { impl Int3 {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.Int3"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.Int3";
@@ -32,7 +32,7 @@ impl Int3 {
} }
/// `struct` shim for C# `LibreMetaverse.Voice.WebRTC.Int4`; members remain intentionally unimplemented. /// `struct` shim for C# `LibreMetaverse.Voice.WebRTC.Int4`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Int4; pub struct Int4;
impl Int4 { impl Int4 {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.Int4"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.Int4";
@@ -40,7 +40,7 @@ impl Int4 {
} }
/// `class` shim for C# `LibreMetaverse.Voice.WebRTC.LibreMetaverseVoiceLogger`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.WebRTC.LibreMetaverseVoiceLogger`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct LibreMetaverseVoiceLogger; pub struct LibreMetaverseVoiceLogger;
impl LibreMetaverseVoiceLogger { impl LibreMetaverseVoiceLogger {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.LibreMetaverseVoiceLogger"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.LibreMetaverseVoiceLogger";
@@ -48,7 +48,7 @@ impl LibreMetaverseVoiceLogger {
} }
/// `class` shim for C# `LibreMetaverse.Voice.WebRTC.OpusDecoderContext`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.WebRTC.OpusDecoderContext`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OpusDecoderContext; pub struct OpusDecoderContext;
impl OpusDecoderContext { impl OpusDecoderContext {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.OpusDecoderContext"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.OpusDecoderContext";
@@ -56,7 +56,7 @@ impl OpusDecoderContext {
} }
/// `class` shim for C# `LibreMetaverse.Voice.WebRTC.PeerAudioState`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.WebRTC.PeerAudioState`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PeerAudioState; pub struct PeerAudioState;
impl PeerAudioState { impl PeerAudioState {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.PeerAudioState"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.PeerAudioState";
@@ -64,7 +64,7 @@ impl PeerAudioState {
} }
/// `class` shim for C# `LibreMetaverse.Voice.WebRTC.PeerManager`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.WebRTC.PeerManager`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PeerManager; pub struct PeerManager;
impl PeerManager { impl PeerManager {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.PeerManager"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.PeerManager";
@@ -72,7 +72,7 @@ impl PeerManager {
} }
/// `class` shim for C# `LibreMetaverse.Voice.WebRTC.VoiceException`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.WebRTC.VoiceException`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceException; pub struct VoiceException;
impl VoiceException { impl VoiceException {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.VoiceException"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.VoiceException";
@@ -80,7 +80,7 @@ impl VoiceException {
} }
/// `class` shim for C# `LibreMetaverse.Voice.WebRTC.VoiceManager`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.WebRTC.VoiceManager`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceManager; pub struct VoiceManager;
impl VoiceManager { impl VoiceManager {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.VoiceManager"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.VoiceManager";
@@ -88,7 +88,7 @@ impl VoiceManager {
} }
/// `class` shim for C# `LibreMetaverse.Voice.WebRTC.VoiceSession`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.Voice.WebRTC.VoiceSession`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct VoiceSession; pub struct VoiceSession;
impl VoiceSession { impl VoiceSession {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.VoiceSession"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.VoiceSession";
@@ -97,7 +97,7 @@ impl VoiceSession {
pub mod libre_metaverse { pub mod libre_metaverse {
/// `class` shim for C# `LibreMetaverse.AudioDevice`; members remain intentionally unimplemented. /// `class` shim for C# `LibreMetaverse.AudioDevice`; members remain intentionally unimplemented.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AudioDevice; pub struct AudioDevice;
impl AudioDevice { impl AudioDevice {
pub const CSHARP_NAME: &'static str = "LibreMetaverse.AudioDevice"; pub const CSHARP_NAME: &'static str = "LibreMetaverse.AudioDevice";

View File

@@ -5,3 +5,4 @@ mod generated;
pub use generated::*; pub use generated::*;
pub use libremetaverse as core; pub use libremetaverse as core;
pub use libremetaverse_structured_data as structured_data; pub use libremetaverse_structured_data as structured_data;
pub use libremetaverse_types::NotImplemented as Error;

File diff suppressed because it is too large Load Diff

View File

@@ -6,6 +6,7 @@ pub use generated::*;
pub use libremetaverse_imaging as imaging_abstractions; pub use libremetaverse_imaging as imaging_abstractions;
pub use libremetaverse_structured_data as structured_data; pub use libremetaverse_structured_data as structured_data;
pub use libremetaverse_types as types; pub use libremetaverse_types as types;
pub use libremetaverse_types::NotImplemented as Error;
/// Common behavior for program shims while the network stack is unimplemented. /// Common behavior for program shims while the network stack is unimplemented.
pub mod shim { pub mod shim {

View File

@@ -0,0 +1,28 @@
use libremetaverse_types::NotImplemented;
const MEMBER: &str = "M:LibreMetaverse.GridClient.Login(System.String)";
#[test]
fn every_api_crate_exposes_the_shared_error() {
macro_rules! assert_aliases {
($($error:path),+ $(,)?) => {$({
let _: $error = NotImplemented::new(MEMBER);
})+};
}
assert_aliases!(
libremetaverse::Error,
libremetaverse_imaging::Error,
libremetaverse_imaging_skia::Error,
libremetaverse_lsl_tools::Error,
libremetaverse_prim_mesher::Error,
libremetaverse_rendering_mesh_foundry::Error,
libremetaverse_rendering_simple::Error,
libremetaverse_rlv::Error,
libremetaverse_structured_data::Error,
libremetaverse_types::Error,
libremetaverse_utilities::Error,
libremetaverse_voice_vivox::Error,
libremetaverse_voice_webrtc::Error,
);
}

View File

@@ -175,6 +175,12 @@ RUST_KEYWORDS = {
"macro", "override", "priv", "typeof", "unsized", "virtual", "yield", "try", "macro", "override", "priv", "typeof", "unsized", "virtual", "yield", "try",
} }
FAKE_BODY = re.compile(
r"\b(?:Default::default|unwrap_or_default|Vec::new|String::new|UUID::nil|Uuid::nil|"
r"(?:std::iter|stream)::empty)\s*\(|\b(?:return\s+)?(?:false|true|0)\s*;|"
r"\b(?:Ok|Some)\(\s*(?:false|true|0|None|Vec::new\(\)|String::new\(\))\s*\)"
)
def snake(name: str) -> str: def snake(name: str) -> str:
name = name.lstrip("@").replace("#", "_") name = name.lstrip("@").replace("#", "_")
@@ -345,6 +351,60 @@ def render_tsv(fieldnames: list[str], rows: list[dict[str, str]]) -> str:
return output.getvalue() return output.getvalue()
def function_bodies(text: str) -> list[str]:
bodies = []
function = re.compile(r"(?m)^[ \t]*(?:pub(?:\([^)]*\))?\s+)?(?:async\s+)?fn\s+[A-Za-z_][A-Za-z0-9_]*")
for match in function.finditer(text):
brace = text.find("{", match.end())
semicolon = text.find(";", match.end())
if brace < 0 or (semicolon >= 0 and semicolon < brace):
continue
depth = 0
quote = None
escaped = False
index = brace
while index < len(text):
char = text[index]
if quote:
if escaped:
escaped = False
elif char == "\\":
escaped = True
elif char == quote:
quote = None
elif char == '"':
quote = char
elif text.startswith("//", index):
newline = text.find("\n", index)
index = len(text) if newline < 0 else newline
elif text.startswith("/*", index):
end = text.find("*/", index + 2)
index = len(text) if end < 0 else end + 1
elif char == "{":
depth += 1
elif char == "}":
depth -= 1
if depth == 0:
bodies.append(text[brace + 1 : index])
break
index += 1
else:
raise ValueError("unbalanced generated Rust function body")
return bodies
def validate_generated_shims() -> None:
for path in sorted((ROOT / "crates").glob("*/src/generated*.rs")):
text = path.read_text()
if re.search(r"#\[derive\([^]]*\bDefault\b", text):
raise ValueError(f"generated shim derives a plausible Default: {path.relative_to(ROOT)}")
for body in function_bodies(text):
if FAKE_BODY.search(body):
raise ValueError(f"generated shim returns a plausible fallback: {path.relative_to(ROOT)}")
if not any(marker in body for marker in ("unimplemented_api!", "not_implemented(", "NotImplemented::new(")):
raise ValueError(f"generated shim function does not use the standardized failure: {path.relative_to(ROOT)}")
def build_type_rows(catalog: dict) -> tuple[list[dict[str, str]], dict[str, str]]: def build_type_rows(catalog: dict) -> tuple[list[dict[str, str]], dict[str, str]]:
rows = [] rows = []
resolved: dict[str, str] = {} resolved: dict[str, str] = {}
@@ -629,6 +689,8 @@ def build_member_rows(catalog: dict, mapper: Mapper) -> list[dict[str, str]]:
def validate(catalog: dict, type_rows: list[dict[str, str]], member_rows: list[dict[str, str]], mapper: Mapper) -> None: def validate(catalog: dict, type_rows: list[dict[str, str]], member_rows: list[dict[str, str]], mapper: Mapper) -> None:
validate_generated_shims()
def unique(rows: list[dict[str, str]], field: str) -> None: def unique(rows: list[dict[str, str]], field: str) -> None:
duplicates = [value for value, count in Counter(row[field] for row in rows).items() if count > 1] duplicates = [value for value, count in Counter(row[field] for row in rows).items() if count > 1]
if duplicates: if duplicates:
@@ -711,7 +773,8 @@ def coverage_report(catalog: dict, type_rows: list[dict[str, str]], member_rows:
f"- C# public members mapped: **{len(member_rows):,} / {catalog['summary']['public_member_count']:,} (100%)**", f"- C# public members mapped: **{len(member_rows):,} / {catalog['summary']['public_member_count']:,} (100%)**",
f"- External signature types resolved: **{len(external):,} / {len(catalog['external_types']):,} (100%)**", f"- External signature types resolved: **{len(external):,} / {len(catalog['external_types']):,} (100%)**",
"- Duplicate C# IDs: **0**", "- Duplicate Rust destinations: **0**", "- Stale or missing catalog IDs: **0**", "- Duplicate C# IDs: **0**", "- Duplicate Rust destinations: **0**", "- Stale or missing catalog IDs: **0**",
"- Unresolved referenced types: **0**", "- Platform-specific mappings: **0**", "", "- Unresolved referenced types: **0**", "- Platform-specific mappings: **0**",
"- Plausible generated fallback bodies/default derives: **0**", "",
"## Assembly representatives", "", "| Assembly | Rust crate | Members | Representative mapping |", "|---|---|---:|---|", "## Assembly representatives", "", "| Assembly | Rust crate | Members | Representative mapping |", "|---|---|---:|---|",
] ]
for assembly in catalog["assemblies"]: for assembly in catalog["assemblies"]:
@@ -761,6 +824,8 @@ def self_check() -> None:
assert split_top_level("A<B, C<D, E>>, F") == ["A<B, C<D, E>>", "F"] assert split_top_level("A<B, C<D, E>>, F") == ["A<B, C<D, E>>", "F"]
assert type_parts("A<B<C>, D>.Nested[]") == ("A.Nested", ["B<C>", "D"], "[]") assert type_parts("A<B<C>, D>.Nested[]") == ("A.Nested", ["B<C>", "D"], "[]")
assert snake("HTTPRequest2") == "http_request2" assert snake("HTTPRequest2") == "http_request2"
assert function_bodies("pub fn value() -> bool { false }") == [" false "]
assert FAKE_BODY.search(function_bodies("pub fn value() -> bool { false; }")[0])
def main() -> None: def main() -> None:

View File

@@ -128,7 +128,7 @@ def render_type(name: str, kind: str, arity: int, csharp_name: str, indent: str)
declaration = f"pub struct {rust_name}{params}" + (";" if not marker else f"{marker};") declaration = f"pub struct {rust_name}{params}" + (";" if not marker else f"{marker};")
return [ return [
f"{indent}/// `{kind}` shim for C# `{csharp_name}`; members remain intentionally unimplemented.", f"{indent}/// `{kind}` shim for C# `{csharp_name}`; members remain intentionally unimplemented.",
f"{indent}#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]", f"{indent}#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]",
f"{indent}{declaration}", f"{indent}{declaration}",
f"{indent}impl{('<' + ', '.join(f'T{i}' for i in range(arity)) + '>') if arity else ''} {rust_name}{('<' + ', '.join(f'T{i}' for i in range(arity)) + '>') if arity else ''} {{", f"{indent}impl{('<' + ', '.join(f'T{i}' for i in range(arity)) + '>') if arity else ''} {rust_name}{('<' + ', '.join(f'T{i}' for i in range(arity)) + '>') if arity else ''} {{",
f"{indent} pub const CSHARP_NAME: &'static str = \"{csharp_name}\";", f"{indent} pub const CSHARP_NAME: &'static str = \"{csharp_name}\";",