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>,
}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
Implementations
sourceimpl StandardLibrary
impl StandardLibrary
pub fn from_name(name: &str) -> Option<StandardLibrary>
sourcepub fn find_global(&self, names: &[String]) -> Option<&Field>
pub fn find_global(&self, names: &[String]) -> Option<&Field>
Find a global in the standard library through its name path. Handles all of the following cases:
- “x.y” where
x.yis explicitly defined - “x.y” where
x.*is defined - “x.y” where
xis a struct with ayor*field - “x.y.z” where
x.*.zorx.*.*is defined - “x.y.z” where
x.yorx.*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 get_globals_under<'a>(
&'a self,
name: &str
) -> HashMap<&'a String, &'a Field>
pub fn extend(&mut self, other: StandardLibrary)
Trait Implementations
sourceimpl Clone for StandardLibrary
impl Clone for StandardLibrary
sourcefn clone(&self) -> StandardLibrary
fn clone(&self) -> StandardLibrary
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for StandardLibrary
impl Debug for StandardLibrary
sourceimpl Default for StandardLibrary
impl Default for StandardLibrary
sourcefn default() -> StandardLibrary
fn default() -> StandardLibrary
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for StandardLibrary
impl<'de> Deserialize<'de> for StandardLibrary
sourcefn 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
sourceimpl From<StandardLibrary> for StandardLibrary
impl From<StandardLibrary> for StandardLibrary
sourcefn from(v1: StandardLibrary) -> Self
fn from(v1: StandardLibrary) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<StandardLibrary> for StandardLibrary
impl PartialEq<StandardLibrary> for StandardLibrary
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &StandardLibrary) -> bool
fn ne(&self, other: &StandardLibrary) -> bool
This method tests for !=.
sourceimpl Serialize for StandardLibrary
impl Serialize for StandardLibrary
impl Eq for StandardLibrary
impl StructuralEq for StandardLibrary
impl StructuralPartialEq for StandardLibrary
Auto Trait Implementations
impl RefUnwindSafe for StandardLibrary
impl Send for StandardLibrary
impl Sync for StandardLibrary
impl Unpin for StandardLibrary
impl UnwindSafe for StandardLibrary
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.