mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-24 11:26:03 +00:00
todo!() epee impl
This commit is contained in:
parent
aa94d93f4d
commit
33c31871e1
2 changed files with 62 additions and 0 deletions
|
@ -9,6 +9,9 @@ use crate::json::output::Output;
|
||||||
///
|
///
|
||||||
/// Used in:
|
/// Used in:
|
||||||
/// - [`/get_block` -> `json`](https://www.getmonero.org/resources/developer-guides/daemon-rpc.html#get_block)
|
/// - [`/get_block` -> `json`](https://www.getmonero.org/resources/developer-guides/daemon-rpc.html#get_block)
|
||||||
|
///
|
||||||
|
/// # TODO
|
||||||
|
/// The epee implementation on this struct panics.
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
pub struct Block {
|
pub struct Block {
|
||||||
|
@ -21,6 +24,34 @@ pub struct Block {
|
||||||
pub tx_hashes: Vec<String>,
|
pub tx_hashes: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "epee")]
|
||||||
|
impl cuprate_epee_encoding::EpeeObjectBuilder<Block> for () {
|
||||||
|
fn add_field<B: bytes::Buf>(
|
||||||
|
&mut self,
|
||||||
|
_: &str,
|
||||||
|
_: &mut B,
|
||||||
|
) -> cuprate_epee_encoding::error::Result<bool> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn finish(self) -> cuprate_epee_encoding::error::Result<Block> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "epee")]
|
||||||
|
impl cuprate_epee_encoding::EpeeObject for Block {
|
||||||
|
type Builder = ();
|
||||||
|
|
||||||
|
fn number_of_fields(&self) -> u64 {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn write_fields<B: bytes::BufMut>(self, _: &mut B) -> cuprate_epee_encoding::error::Result<()> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// [`Block::miner_tx`].
|
/// [`Block::miner_tx`].
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
|
|
|
@ -15,6 +15,9 @@ use crate::json::output::Output;
|
||||||
/// Used in:
|
/// Used in:
|
||||||
/// - [`/get_transactions` -> `txs.as_json`](https://www.getmonero.org/resources/developer-guides/daemon-rpc.html#get_transactions)
|
/// - [`/get_transactions` -> `txs.as_json`](https://www.getmonero.org/resources/developer-guides/daemon-rpc.html#get_transactions)
|
||||||
/// - [`/get_transaction_pool` -> `tx_json`](https://www.getmonero.org/resources/developer-guides/daemon-rpc.html#get_transaction_pool)
|
/// - [`/get_transaction_pool` -> `tx_json`](https://www.getmonero.org/resources/developer-guides/daemon-rpc.html#get_transaction_pool)
|
||||||
|
///
|
||||||
|
/// # TODO
|
||||||
|
/// The epee implementation on this struct panics.
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
|
@ -34,6 +37,34 @@ pub enum Transaction {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "epee")]
|
||||||
|
impl cuprate_epee_encoding::EpeeObjectBuilder<Transaction> for () {
|
||||||
|
fn add_field<B: bytes::Buf>(
|
||||||
|
&mut self,
|
||||||
|
_: &str,
|
||||||
|
_: &mut B,
|
||||||
|
) -> cuprate_epee_encoding::error::Result<bool> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn finish(self) -> cuprate_epee_encoding::error::Result<Transaction> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "epee")]
|
||||||
|
impl cuprate_epee_encoding::EpeeObject for Transaction {
|
||||||
|
type Builder = ();
|
||||||
|
|
||||||
|
fn number_of_fields(&self) -> u64 {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn write_fields<B: bytes::BufMut>(self, _: &mut B) -> cuprate_epee_encoding::error::Result<()> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// [`Transaction::V1::prefix`] & [`Transaction::V2::prefix`].
|
/// [`Transaction::V1::prefix`] & [`Transaction::V2::prefix`].
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
|
|
Loading…
Reference in a new issue