Trait ux::prelude::IsClassFor[][src]

pub unsafe trait IsClassFor: 'static {
    type Instance: ObjectType;
    pub fn get_type(&self) -> Type { ... }
pub fn upcast_ref<U>(&self) -> &U
    where
        U: IsClassFor,
        Self::Instance: IsA<<U as IsClassFor>::Instance>,
        <U as IsClassFor>::Instance: ObjectType
, { ... }
pub fn upcast_ref_mut<U>(&mut self) -> &mut U
    where
        U: IsClassFor,
        Self::Instance: IsA<<U as IsClassFor>::Instance>,
        <U as IsClassFor>::Instance: ObjectType
, { ... }
pub fn downcast_ref<U>(&self) -> Option<&U>
    where
        U: IsClassFor,
        <U as IsClassFor>::Instance: IsA<Self::Instance>,
        Self::Instance: ObjectType
, { ... }
pub fn downcast_ref_mut<U>(&mut self) -> Option<&mut U>
    where
        U: IsClassFor,
        <U as IsClassFor>::Instance: IsA<Self::Instance>,
        Self::Instance: ObjectType
, { ... }
pub fn from_type(type_: Type) -> Option<ClassRef<Self>> { ... } }

Trait for mapping a class struct type to its corresponding instance type.

Associated Types

type Instance: ObjectType[src]

Corresponding Rust instance type for this class.

Loading content...

Provided methods

pub fn get_type(&self) -> Type[src]

Get the type id for this class.

pub fn upcast_ref<U>(&self) -> &U where
    U: IsClassFor,
    Self::Instance: IsA<<U as IsClassFor>::Instance>,
    <U as IsClassFor>::Instance: ObjectType
[src]

Casts this class to a reference to a parent type’s class.

pub fn upcast_ref_mut<U>(&mut self) -> &mut U where
    U: IsClassFor,
    Self::Instance: IsA<<U as IsClassFor>::Instance>,
    <U as IsClassFor>::Instance: ObjectType
[src]

Casts this class to a mutable reference to a parent type’s class.

pub fn downcast_ref<U>(&self) -> Option<&U> where
    U: IsClassFor,
    <U as IsClassFor>::Instance: IsA<Self::Instance>,
    Self::Instance: ObjectType
[src]

Casts this class to a reference to a child type’s class or fails if this class is not implementing the child class.

pub fn downcast_ref_mut<U>(&mut self) -> Option<&mut U> where
    U: IsClassFor,
    <U as IsClassFor>::Instance: IsA<Self::Instance>,
    Self::Instance: ObjectType
[src]

Casts this class to a mutable reference to a child type’s class or fails if this class is not implementing the child class.

pub fn from_type(type_: Type) -> Option<ClassRef<Self>>[src]

Gets the class struct corresponding to type_.

This will return None if type_ is not a subclass of Self.

Loading content...

Implementations on Foreign Types

impl IsClassFor for ObjectClass[src]

impl IsClassFor for InitiallyUnownedClass[src]

impl IsClassFor for BindingClass[src]

impl IsClassFor for FileIconClass

type Instance = FileIcon

impl IsClassFor for SimpleActionClass

type Instance = SimpleAction

impl IsClassFor for SettingsClass

type Instance = Settings

impl IsClassFor for AppLaunchContextClass

type Instance = AppLaunchContext

impl IsClassFor for UnixInputStreamClass

type Instance = UnixInputStream

impl IsClassFor for SocketServiceClass

type Instance = SocketService

impl IsClassFor for InetAddressClass

type Instance = InetAddress

impl IsClassFor for UnixFDListClass

type Instance = UnixFDList

impl IsClassFor for DataOutputStreamClass

type Instance = DataOutputStream

impl IsClassFor for ProxyAddressClass

type Instance = ProxyAddress

impl IsClassFor for TlsInteractionClass

type Instance = TlsInteraction

impl IsClassFor for TlsPasswordClass

type Instance = TlsPassword

impl IsClassFor for IOStreamClass

type Instance = IOStream

impl IsClassFor for SocketConnectionClass

type Instance = SocketConnection

impl IsClassFor for DBusInterfaceSkeletonClass

type Instance = DBusInterfaceSkeleton

impl IsClassFor for MenuAttributeIterClass

type Instance = MenuAttributeIter

impl IsClassFor for ApplicationCommandLineClass

type Instance = ApplicationCommandLine

impl IsClassFor for ConverterInputStreamClass

type Instance = ConverterInputStream

impl IsClassFor for TcpConnectionClass

type Instance = TcpConnection

impl IsClassFor for FileOutputStreamClass

type Instance = FileOutputStream

impl IsClassFor for VolumeMonitorClass

type Instance = VolumeMonitor

impl IsClassFor for InetAddressMaskClass

type Instance = InetAddressMask

impl IsClassFor for PermissionClass

type Instance = Permission

impl IsClassFor for UnixSocketAddressClass

type Instance = UnixSocketAddress

impl IsClassFor for FileInfoClass

type Instance = FileInfo

impl IsClassFor for DBusAuthObserverClass

type Instance = DBusAuthObserver

impl IsClassFor for MenuClass

type Instance = Menu

impl IsClassFor for ResolverClass

type Instance = Resolver

impl IsClassFor for SimpleActionGroupClass

type Instance = SimpleActionGroup

impl IsClassFor for CharsetConverterClass

type Instance = CharsetConverter

impl IsClassFor for TlsDatabaseClass

type Instance = TlsDatabase

impl IsClassFor for DBusMenuModelClass

type Instance = DBusMenuModel

impl IsClassFor for ThreadedSocketServiceClass

type Instance = ThreadedSocketService

impl IsClassFor for DBusServerClass

type Instance = DBusServer

impl IsClassFor for ZlibCompressorClass

type Instance = ZlibCompressor

impl IsClassFor for DBusProxyClass

type Instance = DBusProxy

impl IsClassFor for EmblemedIconClass

type Instance = EmblemedIcon

impl IsClassFor for BufferedInputStreamClass

type Instance = BufferedInputStream

impl IsClassFor for FileMonitorClass

type Instance = FileMonitor

impl IsClassFor for ApplicationClass

type Instance = Application

impl IsClassFor for FilterInputStreamClass

type Instance = FilterInputStream

impl IsClassFor for DesktopAppInfoClass

type Instance = DesktopAppInfo

impl IsClassFor for MountOperationClass

type Instance = MountOperation

impl IsClassFor for PropertyActionClass

type Instance = PropertyAction

impl IsClassFor for ConverterOutputStreamClass

type Instance = ConverterOutputStream

impl IsClassFor for TlsCertificateClass

type Instance = TlsCertificate

impl IsClassFor for OutputStreamClass

type Instance = OutputStream

impl IsClassFor for ThemedIconClass

type Instance = ThemedIcon

impl IsClassFor for VfsClass

type Instance = Vfs

impl IsClassFor for DataInputStreamClass

type Instance = DataInputStream

impl IsClassFor for SubprocessLauncherClass

type Instance = SubprocessLauncher

impl IsClassFor for SocketAddressClass

type Instance = SocketAddress

impl IsClassFor for UnixOutputStreamClass

type Instance = UnixOutputStream

impl IsClassFor for FileIOStreamClass

type Instance = FileIOStream

impl IsClassFor for FileInputStreamClass

type Instance = FileInputStream

impl IsClassFor for SubprocessClass

type Instance = Subprocess

impl IsClassFor for DBusMethodInvocationClass

type Instance = DBusMethodInvocation

impl IsClassFor for BytesIconClass

type Instance = BytesIcon

impl IsClassFor for BufferedOutputStreamClass

type Instance = BufferedOutputStream

impl IsClassFor for DBusConnectionClass

type Instance = DBusConnection

impl IsClassFor for SocketClass

type Instance = Socket

impl IsClassFor for MenuLinkIterClass

type Instance = MenuLinkIter

impl IsClassFor for SocketClientClass

type Instance = SocketClient

impl IsClassFor for CredentialsClass

type Instance = Credentials

impl IsClassFor for MenuItemClass

type Instance = MenuItem

impl IsClassFor for MemoryInputStreamClass

type Instance = MemoryInputStream

impl IsClassFor for EmblemClass

type Instance = Emblem

impl IsClassFor for SettingsBackendClass

type Instance = SettingsBackend

impl IsClassFor for CancellableClass

type Instance = Cancellable

impl IsClassFor for SocketAddressEnumeratorClass

type Instance = SocketAddressEnumerator

impl IsClassFor for DBusMessageClass

type Instance = DBusMessage

impl IsClassFor for TlsConnectionClass

type Instance = TlsConnection

impl IsClassFor for AppInfoMonitorClass

type Instance = AppInfoMonitor

impl IsClassFor for InetSocketAddressClass

type Instance = InetSocketAddress

impl IsClassFor for NotificationClass

type Instance = Notification

impl IsClassFor for FilterOutputStreamClass

type Instance = FilterOutputStream

impl IsClassFor for MemoryOutputStreamClass

type Instance = MemoryOutputStream

impl IsClassFor for ListStoreClass

type Instance = ListStore

impl IsClassFor for FileEnumeratorClass

type Instance = FileEnumerator

impl IsClassFor for FilenameCompleterClass

type Instance = FilenameCompleter

impl IsClassFor for MenuModelClass

type Instance = MenuModel

impl IsClassFor for NetworkServiceClass

type Instance = NetworkService

impl IsClassFor for ZlibDecompressorClass

type Instance = ZlibDecompressor

impl IsClassFor for SocketListenerClass

type Instance = SocketListener

impl IsClassFor for SimpleIOStreamClass

type Instance = SimpleIOStream

impl IsClassFor for InputStreamClass

type Instance = InputStream

impl IsClassFor for SimplePermissionClass

type Instance = SimplePermission

impl IsClassFor for NetworkAddressClass

type Instance = NetworkAddress

impl IsClassFor for FontMapClass[src]

impl IsClassFor for FontFamilyClass[src]

impl IsClassFor for FontsetSimpleClass[src]

impl IsClassFor for CoverageClass[src]

impl IsClassFor for LayoutClass[src]

impl IsClassFor for FontClass[src]

type Instance = Font

impl IsClassFor for EngineLangClass[src]

impl IsClassFor for FontsetClass[src]

impl IsClassFor for FontFaceClass[src]

impl IsClassFor for ContextClass[src]

impl IsClassFor for RendererClass[src]

impl IsClassFor for EngineShapeClass[src]

Loading content...

Implementors

Loading content...