Constructor

Struct Constructor 

Source
pub struct Constructor<C, F> { /* private fields */ }
Expand description

A static high-level wrapper around Java class constructors

See the module documentation for examples.

Implementations§

Source§

impl<C, F> Constructor<C, F>
where F: Type, C: Class,

Source

pub const fn new() -> Self

Creates the lens

Source§

impl<C> Constructor<C, fn()>
where C: Class,

Source

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

Invoke the constructor

Source§

impl<C, FA> Constructor<C, fn(FA)>
where C: Class, FA: Object,

Source

pub fn invoke(&self, e: &mut Env<'_>, fa: FA) -> C

Invoke the constructor

Source§

impl<C, FA, FB> Constructor<C, fn(FA, FB)>
where C: Class, FA: Object, FB: Object,

Source

pub fn invoke(&self, e: &mut Env<'_>, fa: FA, fb: FB) -> C

Invoke the constructor

Source§

impl<C, FA, FB, FC> Constructor<C, fn(FA, FB, FC)>
where C: Class, FA: Object, FB: Object, FC: Object,

Source

pub fn invoke(&self, e: &mut Env<'_>, fa: FA, fb: FB, fc: FC) -> C

Invoke the constructor

Source§

impl<C, FA, FB, FC, FD> Constructor<C, fn(FA, FB, FC, FD)>
where C: Class, FA: Object, FB: Object, FC: Object, FD: Object,

Source

pub fn invoke(&self, e: &mut Env<'_>, fa: FA, fb: FB, fc: FC, fd: FD) -> C

Invoke the constructor

Source§

impl<C, FA, FB, FC, FD, FE> Constructor<C, fn(FA, FB, FC, FD, FE)>
where C: Class, FA: Object, FB: Object, FC: Object, FD: Object, FE: Object,

Source

pub fn invoke( &self, e: &mut Env<'_>, fa: FA, fb: FB, fc: FC, fd: FD, fe: FE, ) -> C

Invoke the constructor

Auto Trait Implementations§

§

impl<C, F> !Freeze for Constructor<C, F>

§

impl<C, F> RefUnwindSafe for Constructor<C, F>

§

impl<C, F> Send for Constructor<C, F>
where C: Send, F: Send,

§

impl<C, F> Sync for Constructor<C, F>
where C: Sync, F: Sync,

§

impl<C, F> Unpin for Constructor<C, F>
where C: Unpin, F: Unpin,

§

impl<C, F> UnwindSafe for Constructor<C, F>
where C: UnwindSafe, F: UnwindSafe,

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V