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
Currently the api of a sub_cursor is like this
SubCursor::new() // empty SubCursor
and
let sub_cursor = SubCursor::from(Cursor::new(vec![])) .start(5) .end(100) .preserve(false);
Fields can only be accessed by calling get_end or get_start, which looks ugly
get_end
get_start
The new api should be
let sub_cursor = SubCursor::builder() .start(5) .end(100) .preserve(false) .build(Cursor::new(vec![1, 2, 3])?; assert_eq!(sub_cursor.end(), 100); assert_eq!(sub_cursor.start(), 5); // setter sub_cursor.set_start(value); sub_cursor.set_end(value);
The new signature of SubCursor::new()
SubCursor::new()
SubCursor::new(cursor: T, start: usize, end: usize, preserve: bool);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently the api of a sub_cursor is like this
and
Fields can only be accessed by calling
get_end
orget_start
, which looks uglyThe new api should be
The new signature of
SubCursor::new()
The text was updated successfully, but these errors were encountered: