Standardize unimplemented API failures
This commit is contained in:
@@ -10,6 +10,7 @@ description = "WebRTC voice shims for the MetaCrate LibreMetaverse rewrite"
|
||||
[dependencies]
|
||||
libremetaverse = { path = "../libremetaverse" }
|
||||
libremetaverse-structured-data = { path = "../libremetaverse-structured-data" }
|
||||
libremetaverse-types = { path = "../libremetaverse-types" }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
/// `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;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct ESessionType;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct Int3;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct Int4;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct LibreMetaverseVoiceLogger;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct OpusDecoderContext;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct PeerAudioState;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct PeerManager;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct VoiceException;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct VoiceManager;
|
||||
impl 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.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct VoiceSession;
|
||||
impl VoiceSession {
|
||||
pub const CSHARP_NAME: &'static str = "LibreMetaverse.Voice.WebRTC.VoiceSession";
|
||||
@@ -97,7 +97,7 @@ impl VoiceSession {
|
||||
|
||||
pub mod libre_metaverse {
|
||||
/// `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;
|
||||
impl AudioDevice {
|
||||
pub const CSHARP_NAME: &'static str = "LibreMetaverse.AudioDevice";
|
||||
|
||||
@@ -5,3 +5,4 @@ mod generated;
|
||||
pub use generated::*;
|
||||
pub use libremetaverse as core;
|
||||
pub use libremetaverse_structured_data as structured_data;
|
||||
pub use libremetaverse_types::NotImplemented as Error;
|
||||
|
||||
Reference in New Issue
Block a user