mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 04:21:04 +00:00
initial support for #[deriving_deserializable]
This commit is contained in:
@@ -153,6 +153,13 @@ pub trait Deserializer<E>: Iterator<Result<Token, E>> {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn expect_tuple_sep<
|
||||
T: Deserializable
|
||||
>(&mut self) -> Result<T, E> {
|
||||
Deserializable::deserialize(self)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn expect_tuple_end(&mut self) -> Result<(), E> {
|
||||
match try!(self.expect_token()) {
|
||||
@@ -221,6 +228,13 @@ pub trait Deserializer<E>: Iterator<Result<Token, E>> {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn expect_enum_sep<
|
||||
T: Deserializable
|
||||
>(&mut self) -> Result<T, E> {
|
||||
Deserializable::deserialize(self)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn expect_enum_end(&mut self) -> Result<(), E> {
|
||||
match try!(self.expect_token()) {
|
||||
|
||||
Reference in New Issue
Block a user