Skip to main content

binds_trait_namespace

Function binds_trait_namespace 

Source
pub(super) fn binds_trait_namespace(
    class_system: ClassSystem,
    methods: &[TraitMethod],
    consts: &[TraitConst],
) -> bool
Expand description

Whether the trait wrappers of class_system for methods and consts bind the Class$Trait namespace in the class’s own object (trait_namespace_env): Env always, R6 for any member, S3 and vctrs for a static method or a const; S4 and S7 keep theirs elsewhere. The trait impl then registers a TraitNamespaceEntry, so the wrapper writer keeps the S3 or vctrs class environment it writes into (#2264, #2289).