TextRequirer

Struct TextRequirer 

Source
pub struct TextRequirer { /* private fields */ }
Available on crate feature luau only.
Expand description

The standard implementation of Luau require-by-string navigation.

Implementations§

Source§

impl TextRequirer

Source

pub fn new() -> Self

Available on crate features luau only.

Creates a new TextRequirer instance.

Trait Implementations§

Source§

impl Debug for TextRequirer

Available on crate features luau only.
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TextRequirer

Available on crate features luau only.
Source§

fn default() -> TextRequirer

Returns the “default value” for a type. Read more
Source§

impl Require for TextRequirer

Available on crate features luau only.
Source§

fn is_require_allowed(&self, chunk_name: &str) -> bool

Available on crate feature luau only.
Returns true if “require” is permitted for the given chunk name.
Source§

fn reset(&mut self, chunk_name: &str) -> StdResult<(), NavigateError>

Available on crate feature luau only.
Resets the internal state to point at the requirer module.
Source§

fn jump_to_alias(&mut self, path: &str) -> StdResult<(), NavigateError>

Available on crate feature luau only.
Resets the internal state to point at an aliased module. Read more
Source§

fn to_parent(&mut self) -> StdResult<(), NavigateError>

Available on crate feature luau only.
Source§

fn to_child(&mut self, name: &str) -> StdResult<(), NavigateError>

Available on crate feature luau only.
Navigate to the given child directory.
Source§

fn has_module(&self) -> bool

Available on crate feature luau only.
Returns whether the context is currently pointing at a module
Source§

fn cache_key(&self) -> String

Available on crate feature luau only.
Provides a cache key representing the current module. Read more
Source§

fn has_config(&self) -> bool

Available on crate feature luau only.
Returns whether a configuration is present in the current context.
Source§

fn config(&self) -> IoResult<Vec<u8>>

Available on crate feature luau only.
Returns the contents of the configuration file in the current context. Read more
Source§

fn loader(&self, lua: &Lua) -> Result<Function>

Available on crate feature luau only.
Returns a loader function for the current module, that when called, loads the module and returns the result. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> MaybeSend for T
where T: Send,