pub trait BigFloatCtx {
    // Required methods
    fn get_prec() -> usize;
    fn get_rm() -> RoundingMode;

    // Provided method
    fn run<F, R>(f: F) -> R
       where F: FnOnce(&mut Context) -> R { ... }
}
Expand description

This trait specifies a type that has zero-argument methods that return a precision and a rounding mode

NOTE: this trait should not be implemented by the user. Please use ConstCtx or make_dyn_ctx.

Required Methods§

source

fn get_prec() -> usize

Returns the precision in bits of this specific context. This is either a const for ConstCtx or dynamic with make_dyn_ctx.

source

fn get_rm() -> RoundingMode

Returns the RoundingMode of this specific context. This is either a const for ConstCtx or dynamic with make_dyn_ctx.

Provided Methods§

source

fn run<F, R>(f: F) -> R
where F: FnOnce(&mut Context) -> R,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<const P: usize, const RM: u8> BigFloatCtx for ConstCtx<P, RM>