pub struct BigInteger(/* private fields */);Expand description
java/math/BigInteger
Implementations§
Source§impl BigInteger
impl BigInteger
Sourcepub fn to_i8(&self, e: &mut Env<'_>) -> i8
pub fn to_i8(&self, e: &mut Env<'_>) -> i8
Interpret result of BigInteger::to_be_bytes as a i8
Sourcepub fn to_i16(&self, e: &mut Env<'_>) -> i16
pub fn to_i16(&self, e: &mut Env<'_>) -> i16
Interpret result of BigInteger::to_be_bytes as a i16
Sourcepub fn to_i32(&self, e: &mut Env<'_>) -> i32
pub fn to_i32(&self, e: &mut Env<'_>) -> i32
Interpret result of BigInteger::to_be_bytes as a i32
Sourcepub fn to_i64(&self, e: &mut Env<'_>) -> i64
pub fn to_i64(&self, e: &mut Env<'_>) -> i64
Interpret result of BigInteger::to_be_bytes as a i64
Sourcepub fn to_i128(&self, e: &mut Env<'_>) -> i128
pub fn to_i128(&self, e: &mut Env<'_>) -> i128
Interpret result of BigInteger::to_be_bytes as a i128
Sourcepub fn to_be_bytes<const N: usize>(&self, e: &mut Env<'_>) -> [u8; N]
pub fn to_be_bytes<const N: usize>(&self, e: &mut Env<'_>) -> [u8; N]
Extract the raw bytes in big-endian order of this BigInteger, panicking if negative or too big
Sourcepub fn from_be_bytes(e: &mut Env<'_>, bytes: &[u8]) -> Self
pub fn from_be_bytes(e: &mut Env<'_>, bytes: &[u8]) -> Self
Create a BigInteger from some bytes, easily gotten
for any signed rust integer (i8, i16, ..) via .to_be_bytes().
Technically, this uses java.math.BigInteger(byte[] bytes) to
create a java.math.BigInteger from an array of bytes that
must represent a signed two’s complement integer, in big-endian order.
Trait Implementations§
Source§impl Class for BigInteger
impl Class for BigInteger
Source§impl Object for BigInteger
impl Object for BigInteger
Source§fn downcast_ref(&self, e: &mut Env<'_>) -> Object
fn downcast_ref(&self, e: &mut Env<'_>) -> Object
Create an object reference from
&selfSource§fn upcast_value_ref<'e>(e: &mut Env<'e>, jv: JValue<'e, '_>) -> Selfwhere
Self: Sized,
fn upcast_value_ref<'e>(e: &mut Env<'e>, jv: JValue<'e, '_>) -> Selfwhere
Self: Sized,
Try to interpret a
JValue as SelfSource§fn upcast_value<'e>(e: &mut Env<'e>, jv: JValueOwned<'e>) -> Selfwhere
Self: Sized,
fn upcast_value<'e>(e: &mut Env<'e>, jv: JValueOwned<'e>) -> Selfwhere
Self: Sized,
Try to interpret a
JValueOwned as SelfSource§fn downcast_value<'e>(self, e: &mut Env<'e>) -> JValueOwned<'e>where
Self: Sized,
fn downcast_value<'e>(self, e: &mut Env<'e>) -> JValueOwned<'e>where
Self: Sized,
Create a
JValueOwned from selfSource§fn yield_to_java(&self, e: &mut Env<'_>) -> jobject
fn yield_to_java(&self, e: &mut Env<'_>) -> jobject
Use this to yield ownership of a
java::lang::Object
to the JVM, for example when returning a jobject from a
native function.Auto Trait Implementations§
impl Freeze for BigInteger
impl RefUnwindSafe for BigInteger
impl Send for BigInteger
impl Sync for BigInteger
impl Unpin for BigInteger
impl UnsafeUnpin for BigInteger
impl UnwindSafe for BigInteger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F, A, TF, T> Sequence<F, A, TF> for T
impl<F, A, TF, T> Sequence<F, A, TF> for T
Source§fn sequence<Ap>(self) -> <Ap as HKT1>::T<<F as HKT1>::T<A>>where
Self: Sized + Traversable<F, <Ap as HKT1>::T<A>, A, TF> + Foldable<F, <Ap as HKT1>::T<A>>,
Ap: HKT1,
<Ap as HKT1>::T<A>: Applicative<Ap, A> + ApplyOnce<Ap, A>,
<Ap as HKT1>::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>,
<Ap as HKT1>::T<<F as HKT1>::T<A>>: Applicative<Ap, <F as HKT1>::T<A>> + ApplyOnce<Ap, <F as HKT1>::T<A>>,
F: HKT1<T<<Ap as HKT1>::T<A>> = Self>,
fn sequence<Ap>(self) -> <Ap as HKT1>::T<<F as HKT1>::T<A>>where
Self: Sized + Traversable<F, <Ap as HKT1>::T<A>, A, TF> + Foldable<F, <Ap as HKT1>::T<A>>,
Ap: HKT1,
<Ap as HKT1>::T<A>: Applicative<Ap, A> + ApplyOnce<Ap, A>,
<Ap as HKT1>::T<TF>: Applicative<Ap, TF> + ApplyOnce<Ap, TF>,
<Ap as HKT1>::T<<F as HKT1>::T<A>>: Applicative<Ap, <F as HKT1>::T<A>> + ApplyOnce<Ap, <F as HKT1>::T<A>>,
F: HKT1<T<<Ap as HKT1>::T<A>> = Self>,
See
Sequence