Skip to main content

compute_extra_bounds

Function compute_extra_bounds 

Source
fn compute_extra_bounds(
    methods: &[MethodInfo],
    trait_name: &Ident,
    assoc_types: &[&Ident],
    trait_param_idents: &[&Ident],
) -> ExtraBounds
Expand description

Compute extra bounds needed for the shim and build_vtable functions.

  • Methods returning Self__ImplT: IntoR
  • Methods with &Self params → __ImplT: TypedExternal + Send + 'static
  • Methods returning types with Self::AssocType or trait type params → full rewritten return type : IntoR (e.g., Option<<__ImplT as RIterator>::Item>: IntoR)
  • Methods with trait type params in params → full param type : TryFromSexp (e.g., Vec<T>: TryFromSexp)