Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

where in Rust

// instead of using this syntax:
fn foo<T: TraitA + TraitB, U: TraitC + TraitD + TraitE>(
  item1: &T,
  item2: &U
) -> i32 {
	return item1.bar
}
// You can use:
fn foo<T, U>(item1: &T, item2: &U) -> i32
where T: TraitA + TraitB,
	  U: TraitC + TraitD + TraitE
{
	return item1.bar()
}
 
PREVIOUS NEXT
Tagged: #Rust
ADD COMMENT
Topic
Name
7+8 =