Пример #1
0
/* Is the given 'messages' iterator pointing at a valid message.
 *
 * When this function returns TRUE, notmuch_messages_get will return a
 * valid object. Whereas when this function returns FALSE,
 * notmuch_messages_get will return NULL.
 *
 * See the documentation of notmuch_query_search_messages for example
 * code showing how to iterate over a notmuch_messages_t object.
 */
func (self *Messages) Valid() bool {
	if self.messages == nil {
		return false
	}
	valid := C.notmuch_messages_valid(self.messages)
	if valid == 0 {
		return false
	}
	return true
}
Пример #2
0
func (ms *Messages) valid() bool {
	cbool := C.notmuch_messages_valid(ms.toC())
	return int(cbool) != 0
}