Struct selene_lib::standard_library::StandardLibrary
source · pub struct StandardLibrary {
pub base: Option<String>,
pub name: Option<String>,
pub globals: BTreeMap<String, Field>,
pub structs: BTreeMap<String, BTreeMap<String, Field>>,
pub last_updated: Option<i64>,
pub last_selene_version: Option<String>,
pub roblox_classes: BTreeMap<String, RobloxClass>,
/* private fields */
}
Fields§
§base: Option<String>
§name: Option<String>
§globals: BTreeMap<String, Field>
§structs: BTreeMap<String, BTreeMap<String, Field>>
§last_updated: Option<i64>
Internal, used for the Roblox standard library
last_selene_version: Option<String>
§roblox_classes: BTreeMap<String, RobloxClass>
Implementations§
source§impl StandardLibrary
impl StandardLibrary
sourcepub fn find_global<S: Borrow<str>>(&self, names: &[S]) -> Option<&Field>
pub fn find_global<S: Borrow<str>>(&self, names: &[S]) -> Option<&Field>
Find a global in the standard library through its name path. Handles all of the following cases:
- “x.y” where
x.y
is explicitly defined - “x.y” where
x.*
is defined - “x.y” where
x
is a struct with ay
or*
field - “x.y.z” where
x.*.z
orx.*.*
is defined - “x.y.z” where
x.y
orx.*
is defined as “any” - “x.y” resolving to a read only property if only “x.y.z” (or x.y.*) is explicitly defined
pub fn global_has_fields(&self, name: &str) -> bool
pub fn extend(&mut self, other: StandardLibrary)
pub fn roblox_base() -> StandardLibrary
source§impl StandardLibrary
impl StandardLibrary
pub fn from_name(name: &str) -> Option<StandardLibrary>
pub fn all_default_standard_libraries( ) -> &'static HashMap<&'static str, StandardLibrary>
Trait Implementations§
source§impl Clone for StandardLibrary
impl Clone for StandardLibrary
source§fn clone(&self) -> StandardLibrary
fn clone(&self) -> StandardLibrary
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StandardLibrary
impl Debug for StandardLibrary
source§impl Default for StandardLibrary
impl Default for StandardLibrary
source§fn default() -> StandardLibrary
fn default() -> StandardLibrary
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for StandardLibrary
impl<'de> Deserialize<'de> for StandardLibrary
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<StandardLibrary> for StandardLibrary
impl From<StandardLibrary> for StandardLibrary
source§fn from(v1: StandardLibrary) -> Self
fn from(v1: StandardLibrary) -> Self
Converts to this type from the input type.
source§impl PartialEq for StandardLibrary
impl PartialEq for StandardLibrary
source§fn eq(&self, other: &StandardLibrary) -> bool
fn eq(&self, other: &StandardLibrary) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for StandardLibrary
impl Serialize for StandardLibrary
impl Eq for StandardLibrary
impl StructuralPartialEq for StandardLibrary
Auto Trait Implementations§
impl !Freeze for StandardLibrary
impl RefUnwindSafe for StandardLibrary
impl Send for StandardLibrary
impl Sync for StandardLibrary
impl Unpin for StandardLibrary
impl UnwindSafe for StandardLibrary
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.