Hi, I am trying to feed an external type into my function, which has trait bounds to ensure the type has a len(). I am using the len-trait crate, which works great for most types (str, String, Vec, etc.). The issue is that I am trying to feed in another external type, which does not implement the len trait, and since I don't own either the external type or the len trait, I can't implement the len trait for it. My solution is to create another len trait that I do own, implement it for the type, and then pass it to my function. The issue I face is that my function only accepts types implementing the len-trait::len trait. Can I make this function accept types with the len-trait::len OR my len trait. I know how to AND traits together using '+', but I can't find the syntax for ORing traits together.
Here is my function header right now:
pub fn filter_by_length<T: len_trait::Len> (lists: &mut Vec<Vec<T>>, min_length: Option<usize>, max_length: Option<usize>)