[][src]Struct rbx_reflection::RbxEnumDescriptor

pub struct RbxEnumDescriptor { /* fields omitted */ }

Describes a Roblox enum.

This data is generated from the official Roblox JSON API dump and should be completely accurate.

Enums have a name and zero or more variants, which are represented as u32 values.

Methods

impl RbxEnumDescriptor[src]

pub fn name(&self) -> &str[src]

The name of the enum as reported by Roblox.

pub fn get_item<'a>(&'a self, name: &str) -> Option<u32>[src]

Returns an item from the enum by name, if it exists.

pub fn iter_items(&self) -> impl Iterator<Item = (&str, u32)>[src]

Returns an iterator over all items in this enum and their names.

Trait Implementations

impl PartialEq<RbxEnumDescriptor> for RbxEnumDescriptor[src]

impl Debug for RbxEnumDescriptor[src]

Auto Trait Implementations

Blanket Implementations

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

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

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.

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

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

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