1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

delete unused serde module

This commit is contained in:
mat 2023-07-20 06:49:47 -05:00
parent 7959a18001
commit 2ab16402de
2 changed files with 0 additions and 206 deletions

View file

@ -1 +0,0 @@
mod serializer;

View file

@ -1,205 +0,0 @@
use serde::{ser, Serialize};
use crate::Nbt;
use std;
use std::fmt::{self, Display};
use serde::de;
pub type Result<T> = std::result::Result<T, Error>;
// This is a bare-bones implementation. A real library would provide additional
// information in its error type, for example the line and column at which the
// error occurred, the byte offset into the input, or the current key being
// processed.
#[derive(Debug)]
pub enum Error {
Message(String),
}
impl Display for Error {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
match self {
Error::Message(msg) => formatter.write_str(msg),
}
}
}
impl ser::Error for Error {
fn custom<T: Display>(msg: T) -> Self {
Error::Message(msg.to_string())
}
}
impl de::Error for Error {
fn custom<T: Display>(msg: T) -> Self {
Error::Message(msg.to_string())
}
}
impl std::error::Error for Error {}
impl<'a> ser::Serializer for &'a mut Nbt {
type Ok = ();
type Error = Error;
type SerializeSeq = Self;
type SerializeTuple = Self;
type SerializeTupleStruct = Self;
type SerializeTupleVariant = Self;
type SerializeMap = Self;
type SerializeStruct = Self;
type SerializeStructVariant = Self;
fn serialize_bool(self, v: bool) -> Result<()> {
todo!()
}
fn serialize_i8(self, v: i8) -> Result<()> {
todo!()
}
fn serialize_i16(self, v: i16) -> Result<()> {
todo!()
}
fn serialize_i32(self, v: i32) -> Result<()> {
todo!()
}
fn serialize_i64(self, v: i64) -> Result<()> {
todo!()
}
fn serialize_u8(self, v: u8) -> Result<()> {
todo!()
}
fn serialize_u16(self, v: u16) -> Result<()> {
todo!()
}
fn serialize_u32(self, v: u32) -> Result<()> {
todo!()
}
fn serialize_u64(self, v: u64) -> Result<()> {
todo!()
}
fn serialize_f32(self, v: f32) -> Result<()> {
todo!()
}
fn serialize_f64(self, v: f64) -> Result<()> {
todo!()
}
fn serialize_char(self, v: char) -> Result<()> {
todo!()
}
fn serialize_str(self, v: &str) -> Result<()> {
todo!()
}
fn serialize_bytes(self, v: &[u8]) -> Result<()> {
todo!()
}
fn serialize_none(self) -> Result<()> {
todo!()
}
fn serialize_some<T: ?Sized>(self, value: &T) -> Result<()>
where
T: Serialize,
{
todo!()
}
fn serialize_unit(self) -> Result<()> {
todo!()
}
fn serialize_unit_struct(self, name: &'static str) -> Result<()> {
todo!()
}
fn serialize_unit_variant(
self,
name: &'static str,
variant_index: u32,
variant: &'static str,
) -> Result<()> {
todo!()
}
fn serialize_newtype_struct<T: ?Sized>(self, name: &'static str, value: &T) -> Result<()>
where
T: Serialize,
{
todo!()
}
fn serialize_newtype_variant<T: ?Sized>(
self,
name: &'static str,
variant_index: u32,
variant: &'static str,
value: &T,
) -> Result<()>
where
T: Serialize,
{
todo!()
}
fn serialize_seq(self, len: Option<usize>) -> Result<()> {
todo!()
}
fn serialize_tuple(self, len: usize) -> Result<()> {
todo!()
}
fn serialize_tuple_struct(self, name: &'static str, len: usize) -> Result<()> {
todo!()
}
fn serialize_tuple_variant(
self,
name: &'static str,
variant_index: u32,
variant: &'static str,
len: usize,
) -> Result<()> {
todo!()
}
fn serialize_map(self, len: Option<usize>) -> Result<()> {
todo!()
}
fn serialize_struct(self, name: &'static str, len: usize) -> Result<()> {
todo!()
}
fn serialize_struct_variant(
self,
name: &'static str,
variant_index: u32,
variant: &'static str,
len: usize,
) -> Result<()> {
todo!()
}
}