Skip to main content

Java

Trait Java 

Source
pub trait Java: Sized {
    // Required methods
    fn desc() -> String;
    fn to_value(&self) -> Value;
    fn from_value(v: Value) -> Option<Self>;
}
Expand description

A Java type a nanite’s member takes or gives.

Required Methods§

Source

fn desc() -> String

Its descriptor (I, Ljava/lang/String;).

Source

fn to_value(&self) -> Value

Source

fn from_value(v: Value) -> Option<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Java for String

Source§

impl Java for bool

Source§

impl Java for f32

Source§

impl Java for f64

Source§

impl Java for i8

Source§

impl Java for i16

Source§

impl Java for i32

Source§

impl Java for i64

Source§

impl Java for u16

Source§

impl<T: Java> Java for Option<T>

A nullable object: None crosses as null.

Implementors§

Source§

impl<T: Nanite> Java for T