Skip to main content

InetAddress

Enum InetAddress 

Source
pub enum InetAddress {
    V4(Inet4Address),
    V6(Inet6Address),
}
Expand description

java.net.InetAddress

Variants§

Implementations§

Source§

impl InetAddress

Source

pub fn new_ipv4(e: &mut Env<'_>, addr: [u8; 4]) -> Self

Source

pub fn new_ipv6(e: &mut Env<'_>, addr: [u8; 16]) -> Self

Source

pub fn to_std(&self, e: &mut Env<'_>) -> IpAddr

Convert InetAddress to std::net::IpAddr

Source

pub fn to_no_std(&self, e: &mut Env<'_>) -> IpAddr

Convert InetAddress to no_std_net::IpAddr

Source

pub fn from_std(e: &mut Env<'_>, addr: IpAddr) -> Self

Convert std::net::IpAddr to InetAddress

Source

pub fn from_no_std(e: &mut Env<'_>, addr: IpAddr) -> Self

Convert no_std_net::IpAddr to InetAddress

Trait Implementations§

Source§

impl Class for InetAddress

Source§

const PATH: &'static str = "java/net/InetAddress"

The fully qualified java class path (slash-separated) Read more
Source§

impl Object for InetAddress

Source§

fn upcast(e: &mut Env<'_>, jobj: Object) -> Self

Try to interpret an object as Self
Source§

fn downcast(self, e: &mut Env<'_>) -> Object

Create an object reference from self
Source§

fn downcast_ref(&self, e: &mut Env<'_>) -> Object

Create an object reference from &self
Source§

fn upcast_value_ref<'e>(e: &mut Env<'e>, jv: JValue<'e, '_>) -> Self
where Self: Sized,

Try to interpret a JValue as Self
Source§

fn upcast_value<'e>(e: &mut Env<'e>, jv: JValueOwned<'e>) -> Self
where Self: Sized,

Try to interpret a JValueOwned as Self
Source§

fn downcast_value<'e>(self, e: &mut Env<'e>) -> JValueOwned<'e>
where Self: Sized,

Create a JValueOwned from self
Source§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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>,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Type for T
where T: Class,

Source§

const SIG: Signature = const SIG: Signature = Signature::class(T::PATH);

The signature for this type
Source§

fn jni() -> JavaType

Get the jni rep of this type
Source§

fn is_type_of(e: &mut Env<'_>, o: &JObject<'_>) -> bool

Determines whether an object is an instance of this type
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,