We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
like this
enum ByteOrder { BigEndian, LittleEndian, }
then we can use the struct like parameter like this
pub fn hello(order:ByteOrder) ->() { let mut rdr = Cursor::new(vec![2, 5, 3, 0]); match order { BigEndian => rdr.read_u16::<BigEndian>().unwrap(); LittleEndian => rdr.read_u16::<LittleEndian>().unwrap(); _=>() } }
The text was updated successfully, but these errors were encountered:
This issue is drastically under specified, and I believe it is a duplicate of #95.
Sorry, something went wrong.
No branches or pull requests
like this
then we can use the struct like parameter
like this
The text was updated successfully, but these errors were encountered: