[][src]Struct qt_qml::q_j_s_engine::Extension

#[repr(transparent)]pub struct Extension(_);

This enum is used to specify extensions to be installed via installExtensions().

C++ enum: QJSEngine::Extension.

C++ documentation:

This enum is used to specify extensions to be installed via installExtensions().

TranslationExtension

The relation between script translation functions and C++ translation functions is described in the following table:

Script FunctionCorresponding C++ Function
qsTr()QObject::tr()
QT_TR_NOOP()QT_TR_NOOP()
qsTranslate()QCoreApplication::translate()
QT_TRANSLATE_NOOP()QT_TRANSLATE_NOOP()
qsTrId()qtTrId()
QT_TRID_NOOP()QT_TRID_NOOP()

This flag also adds an arg() function to the string prototype.

For more information, see the Internationalization with Qt documentation.

ConsoleExtension

The console object implements a subset of the Console API, which provides familiar logging functions, such as console.log().

The list of functions added is as follows:

  • console.assert()
  • console.debug()
  • console.exception()
  • console.info()
  • console.log() (equivalent to console.debug())
  • console.error()
  • console.time()
  • console.timeEnd()
  • console.trace()
  • console.count()
  • console.warn()
  • print() (equivalent to console.debug())

For more information, see the Console API documentation.

GarbageCollectionExtension

The gc() function is equivalent to calling collectGarbage().

The Extensions type is a typedef for QFlags<Extension>. It stores an OR combination of Extension values.

Methods

impl Extension[src]

pub fn to_int(&self) -> c_int[src]

impl Extension[src]

pub const TranslationExtension: Extension[src]

Indicates that translation functions (qsTr(), for example) should be installed. (C++ enum variant: TranslationExtension = 1)

pub const ConsoleExtension: Extension[src]

Indicates that console functions (console.log(), for example) should be installed. (C++ enum variant: ConsoleExtension = 2)

pub const GarbageCollectionExtension: Extension[src]

Indicates that garbage collection functions (gc(), for example) should be installed. (C++ enum variant: GarbageCollectionExtension = 4)

pub const AllExtensions: Extension[src]

Indicates that all extension should be installed. (C++ enum variant: AllExtensions = -1)

Trait Implementations

impl<T: Into<QFlags<Extension>>> BitOr<T> for Extension[src]

type Output = QFlags<Extension>

The resulting type after applying the | operator.

impl Clone for Extension[src]

impl Copy for Extension[src]

impl Debug for Extension[src]

impl Eq for Extension[src]

impl From<Extension> for c_int[src]

impl From<Extension> for QFlags<Extension>[src]

impl From<i32> for Extension[src]

impl PartialEq<Extension> for Extension[src]

impl StructuralEq for Extension[src]

impl StructuralPartialEq for Extension[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.