Skip to main content

QRandomGenerator

Struct QRandomGenerator 

Source
pub struct QRandomGenerator { /* private fields */ }
Expand description

C++ class: QRandomGenerator.

Implementations§

Source§

impl QRandomGenerator

Source

pub unsafe fn bounded_double(&self, highest: c_double) -> c_double

Calls C++ function: double QRandomGenerator::bounded(double highest).

Source

pub unsafe fn bounded_uint(&self, highest: c_uint) -> c_uint

Calls C++ function: unsigned int QRandomGenerator::bounded(unsigned int highest).

Source

pub unsafe fn bounded_2_uint(&self, lowest: c_uint, highest: c_uint) -> c_uint

Calls C++ function: unsigned int QRandomGenerator::bounded(unsigned int lowest, unsigned int highest).

Source

pub unsafe fn bounded_int(&self, highest: c_int) -> c_int

Calls C++ function: int QRandomGenerator::bounded(int highest).

Source

pub unsafe fn bounded_2_int(&self, lowest: c_int, highest: c_int) -> c_int

Calls C++ function: int QRandomGenerator::bounded(int lowest, int highest).

Source

pub unsafe fn call(&self) -> c_uint

Calls C++ function: unsigned int QRandomGenerator::operator()().

Source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QRandomGenerator>>, ) -> Ref<QRandomGenerator>

Calls C++ function: QRandomGenerator& QRandomGenerator::operator=(const QRandomGenerator& other).

Source

pub unsafe fn discard(&self, z: c_ulonglong)

Calls C++ function: void QRandomGenerator::discard(unsigned long long z).

Source

pub unsafe fn generate_0a(&self) -> c_uint

Calls C++ function: unsigned int QRandomGenerator::generate().

Source

pub unsafe fn generate_2a(&self, begin: *mut c_uint, end: *mut c_uint)

Calls C++ function: void QRandomGenerator::generate(unsigned int* begin, unsigned int* end).

Source

pub unsafe fn generate64(&self) -> c_ulonglong

Calls C++ function: unsigned long long QRandomGenerator::generate64().

Source

pub unsafe fn generate_double(&self) -> c_double

Calls C++ function: double QRandomGenerator::generateDouble().

Source

pub unsafe fn global() -> Ptr<QRandomGenerator>

Calls C++ function: static QRandomGenerator* QRandomGenerator::global().

Source

pub unsafe fn max() -> c_uint

Calls C++ function: static unsigned int QRandomGenerator::max().

Source

pub unsafe fn min() -> c_uint

Calls C++ function: static unsigned int QRandomGenerator::min().

Source

pub unsafe fn from_uint(seed_value: c_uint) -> CppBox<QRandomGenerator>

Calls C++ function: [constructor] void QRandomGenerator::QRandomGenerator(unsigned int seedValue = …).

Source

pub unsafe fn from_uint_longlong( seed_buffer: *const c_uint, len: c_longlong, ) -> CppBox<QRandomGenerator>

Calls C++ function: [constructor] void QRandomGenerator::QRandomGenerator(const unsigned int* seedBuffer, long long len).

Source

pub unsafe fn from_2_uint( begin: *const c_uint, end: *const c_uint, ) -> CppBox<QRandomGenerator>

Calls C++ function: [constructor] void QRandomGenerator::QRandomGenerator(const unsigned int* begin, const unsigned int* end).

Source

pub unsafe fn new() -> CppBox<QRandomGenerator>

Calls C++ function: [constructor] void QRandomGenerator::QRandomGenerator().

Source

pub unsafe fn new_copy( other: impl CastInto<Ref<QRandomGenerator>>, ) -> CppBox<QRandomGenerator>

Calls C++ function: [constructor] void QRandomGenerator::QRandomGenerator(const QRandomGenerator& other).

Source

pub unsafe fn securely_seeded() -> CppBox<QRandomGenerator>

Calls C++ function: static QRandomGenerator QRandomGenerator::securelySeeded().

Source

pub unsafe fn seed_1a(&self, s: c_uint)

Calls C++ function: void QRandomGenerator::seed(unsigned int s = …).

Source

pub unsafe fn seed_0a(&self)

Calls C++ function: void QRandomGenerator::seed().

Source

pub unsafe fn system() -> Ptr<QRandomGenerator>

Calls C++ function: static QRandomGenerator* QRandomGenerator::system().

Trait Implementations§

Source§

impl CppDeletable for QRandomGenerator

Source§

unsafe fn delete(&self)

Calls C++ function: [destructor] void QRandomGenerator::~QRandomGenerator().

Source§

impl StaticDowncast<QRandomGenerator64> for QRandomGenerator

Source§

unsafe fn static_downcast(ptr: Ptr<QRandomGenerator>) -> Ptr<QRandomGenerator64>

Calls C++ function: QRandomGenerator64* static_cast<QRandomGenerator64*>(QRandomGenerator* ptr).

Source§

impl StaticUpcast<QRandomGenerator> for QRandomGenerator64

Source§

unsafe fn static_upcast(ptr: Ptr<QRandomGenerator64>) -> Ptr<QRandomGenerator>

Calls C++ function: QRandomGenerator* static_cast<QRandomGenerator*>(QRandomGenerator64* ptr).

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