1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use core::marker::PhantomData;

use crate::{
    api::{ManagedTypeApi, PrintApi, PrintApiImpl},
    types::{BigUint, ManagedType},
};

#[derive(Default)]
pub struct PrintHelper<A>
where
    A: PrintApi + ManagedTypeApi,
{
    _phantom: PhantomData<A>,
}

impl<A> PrintHelper<A>
where
    A: PrintApi + ManagedTypeApi,
{
    pub(crate) fn new() -> Self {
        PrintHelper {
            _phantom: PhantomData,
        }
    }

    pub fn print_biguint(&self, biguint: &BigUint<A>) {
        A::print_api_impl().print_biguint(biguint.get_raw_handle());
    }
}