Trait big_int::Build

source ·
pub trait Build<B> {
    // Required method
    fn build(self) -> B;
}
Expand description

Trait that represents the final build step of a BigIntBuilder.

use big_int::prelude::*;

let mut a = TightBuilder::<10>::new();
a.push_back(5);
a.push_back(3);
a.push_back(0);
a.push_back(4);
let a: Tight<10> = a.build();
assert_eq!(a, 5304.into());

Required Methods§

source

fn build(self) -> B

Build the value and return the finalized result.

use big_int::prelude::*;

let mut a = TightBuilder::<10>::new();
a.push_back(5);
a.push_back(3);
a.push_back(0);
a.push_back(4);
let a: Tight<10> = a.build();
assert_eq!(a, 5304.into());

Implementors§

source§

impl<const BASE: usize> Build<Loose<BASE>> for LooseBuilder<BASE>

source§

impl<const BASE: usize> Build<Tight<BASE>> for TightBuilder<BASE>