Struct qt_core::Receiver

source ·
pub struct Receiver<Arguments> { /* private fields */ }
Expand description

Reference to a particular signal or slot of a particular object.

A Receiver can be used as the receiving side of a Qt signal connection. The Arguments generic argument specifies argument types of this signal or slot.

Implementations§

source§

impl<A> Receiver<A>

source

pub unsafe fn new( q_object: impl CastInto<Ref<QObject>>, receiver_id: &'static CStr ) -> Self

Creates a Receiver than references a signal or a slot of q_object identified by receiver_id.

This function should not be used manually. It’s normally called from functions generated by ritual. receiver_id is the ID returned by Qt’s SIGNAL and SLOT C++ macros.

Safety

q_object must contain a valid pointer to a QObject-based object. The object must outlive the created Receiver object.

Trait Implementations§

source§

impl<A> AsReceiver for Receiver<A>

§

type Arguments = A

Argument types expected by this receiver.
source§

fn as_receiver(&self) -> Receiver<A>

Returns information about this receiver.
source§

impl<A> Clone for Receiver<A>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<A> Debug for Receiver<A>

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<A> Copy for Receiver<A>

Auto Trait Implementations§

§

impl<Arguments> RefUnwindSafe for Receiver<Arguments>
where Arguments: RefUnwindSafe,

§

impl<Arguments> !Send for Receiver<Arguments>

§

impl<Arguments> !Sync for Receiver<Arguments>

§

impl<Arguments> Unpin for Receiver<Arguments>
where Arguments: Unpin,

§

impl<Arguments> UnwindSafe for Receiver<Arguments>
where Arguments: 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, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. 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> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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

§

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.