pub struct ModuleStub { /* private fields */ }Expand description
A host module’s .pyi, written as a module or package tree for the type checker.
Construction validates each path component and rejects top-level names reserved by the
sandbox or checker, preventing stubs from shadowing their modules.
Implementations§
Source§impl ModuleStub
impl ModuleStub
Sourcepub fn new(
module: impl Into<String>,
source: impl Into<String>,
) -> Result<Self, ModuleStubError>
pub fn new( module: impl Into<String>, source: impl Into<String>, ) -> Result<Self, ModuleStubError>
Validates each dotted component as an identifier and rejects top-level names reserved
by validate_module_name or CHECKER_MODULE_NAMES.
Trait Implementations§
Source§impl Clone for ModuleStub
impl Clone for ModuleStub
Source§impl Debug for ModuleStub
impl Debug for ModuleStub
Source§impl<'de> Deserialize<'de> for ModuleStub
impl<'de> Deserialize<'de> for ModuleStub
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
impl Eq for ModuleStub
Source§impl PartialEq for ModuleStub
impl PartialEq for ModuleStub
Source§impl Serialize for ModuleStub
impl Serialize for ModuleStub
impl StructuralPartialEq for ModuleStub
Auto Trait Implementations§
impl Freeze for ModuleStub
impl RefUnwindSafe for ModuleStub
impl Send for ModuleStub
impl Sync for ModuleStub
impl Unpin for ModuleStub
impl UnsafeUnpin for ModuleStub
impl UnwindSafe for ModuleStub
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