pub fn find_bookmark_by_index(self, index: u32) -> Option<IndexBasedBookmark> {
        if index >= self.bookmark_count().total_count {
            return None;
        }
        Some(IndexBasedBookmark::new(self, index))
    }
// If we make this clean one day, I think this a good way: When wandering from the project to
// a bookmark, we *should* return an Option if it doesn't exist. If one wants to create a
// IndexBasedBookmark value - irrelevant of it exists or not - they can just create it
// directly. That's good because it allows for a fluent, idiomatic API. The methods of the
// returned object should not return an error if the object is not available - they should
// panic instead because at this point (the fluent API use) we can safely assume they *are*
// available - because it was checked in the find() call before. Long-living objects whose
// methods return results depending on their availability are maybe not a good idea!
//
// The returned bookmark should provide methods to dive further in a fluent way (doing
// REAPER function calls as necessary). It shouldn't contain any snapshot data.
// There's the related question how to deal with info that is discovered already while
// finding the bookmark. It's a snapshot only, so it should *not* be part of the actually
// returned bookmark. But it could be returned as side product.
If we make this clean one day, I think this a good way: When wandering from the project to
a bookmark, we *should* return an Option if it doesn't exist. If one wants to create a
IndexBasedBookmark value - irrelevant of it exists or not - they can just create it
directly. That's good because it allows for a fluent, idiomatic API. The methods of the
returned object should not return an error if the object is not available - they should
panic instead because at this point (the fluent API use) we can safely assume they *are
available - because it was checked in the find() call before. Long-living objects whose
methods return results depending on their availability are maybe not a good idea!

The returned bookmark should provide methods to dive further in a fluent way (doing
REAPER function calls as necessary). It shouldn't contain any snapshot data.
There's the related question how to deal with info that is discovered already while
finding the bookmark. It's a snapshot only, so it should *not* be part of the actually
returned bookmark. But it could be returned as side product.
If we make this clean one day I think this a good way : When wandering from the project to a bookmark we * should * return an Option if it doesn ' t exist . If one wants to create a IndexBasedBookmark value - irrelevant of it exists or not - they can just create it directly . That ' s good because it allows for a fluent idiomatic API . The methods of the returned object should not return an error if the object is not available - they should panic instead because at this point ( the fluent API use ) we can safely assume they * are available - because it was checked in the find () call before . Long - living objects whose methods return results depending on their availability are maybe not a good idea! The returned bookmark should provide methods to dive further in a fluent way ( doing REAPER function calls as necessary ) . It shouldn ' t contain any snapshot data . There ' s the related question how to deal with info that is discovered already while finding the bookmark . It ' s a snapshot only so it should * not * be part of the actually returned bookmark . But it could be returned as side product .
pub fn find_bookmark_by_index(self, index: u32) -> Option<IndexBasedBookmark> {
        if index >= self.bookmark_count().total_count {
            return None;
        }
        Some(IndexBasedBookmark::new(self, index))
    }
pub fn find_bookmark_by_index ( self , index : u32 ) -> Option < IndexBasedBookmark > { if index >= self . bookmark_count ( ) . total_count { return None ; } Some ( IndexBasedBookmark :: new ( self , index ) ) }
If we make this clean one day, I think this a good way: When wandering from the project to
a bookmark, we *should* return an Option if it doesn't exist.
If we make this clean one day I think this a good way : When wandering from the project to a bookmark we * should * return an Option if it doesn ' t exist .
self
index
u32
self
index
u32