// LastPage returns the last page of messages.
541709
func (c *IPMessageList) LastPage() (*IPMessageList, error) {
	return c.getPage(c.Meta.LastPageUri)
}
1339799
func (t *TSMReader) LastModified() int64 {
	t.mu.RLock()
	lm := t.lastModified
	for _, ts := range t.tombstoner.TombstoneFiles() {
		if ts.LastModified > lm {
			lm = ts.LastModified
		}
	}
	t.mu.RUnlock()
	return lm
}
311947
func (c *IPChannelList) FirstPage() (*IPChannelList, error) {
	return c.getPage(c.Meta.FirstPageUri)
}
1180808
func (m *DummyMailbox) LastUID() uint32 {
	lastMsgIndex := len(m.messages) - 1

	// If no messages in the mailbox, return the next UID
	if lastMsgIndex == -1 {
		return m.NextUID()
	}

	return m.messages[lastMsgIndex].UID()
}
918311
func (t *Tree) Last() (k []byte, v []byte) {
	if q := t.last; q != nil {
		q := &q.d[q.c-1]
		k, v = q.k, q.v
	}
	return
}
1221964
func (trb *RingBuffer) Last() *Msg {
	trb.m.Lock()
	last := trb.lastUNLOCKED()
	trb.m.Unlock()
	return last
}
1295071
func (nc *Conn) LastError() error {
	if nc == nil {
		return ErrInvalidConnection
	}
	nc.mu.RLock()
	err := nc.err
	nc.mu.RUnlock()
	return err
}
910401
func (l *List) Last() (result string, err error) {
	if l.name == nil {
		return "", ErrDoesNotExist
	}
	return result, (*bbolt.DB)(l.db).View(func(tx *bbolt.Tx) error {
		bucket := tx.Bucket(l.name)
		if bucket == nil {
			return ErrBucketNotFound
		}
		cursor := bucket.Cursor()
		// Ignore the key
		_, value := cursor.Last()
		result = string(value)
		return nil // Return from View function
	})
}
874229
func (p *PaginationResponseMeta) nextPage(originalQuery *PaginationMeta) (next *PaginationMeta) {
	nextOffset := p.Offset + p.Length

	if nextOffset >= p.Found {
		return nil
	}

	next = &PaginationMeta{}
	next.Offset = nextOffset
	next.Length = p.Length

	if originalQuery != nil {
		next.OrderBy = originalQuery.OrderBy
		next.Sort = originalQuery.Sort
	}

	return next
}
187293
func (c *Cursor) Last() (key []byte, value []byte) {
	_assert(c.bucket.tx.db != nil, "tx closed")
	c.stack = c.stack[:0]
	p, n := c.bucket.pageNode(c.bucket.root)
	ref := elemRef{page: p, node: n}
	ref.index = ref.count() - 1
	c.stack = append(c.stack, ref)
	c.last()
	k, v, flags := c.keyValue()
	if (flags & uint32(bucketLeafFlag)) != 0 {
		return k, nil
	}
	return k, v
}
737135
func (dd *dictDecoder) LastBytes() (p1, p2 byte) {
	if dd.wrPos > 1 {
		return dd.hist[dd.wrPos-1], dd.hist[dd.wrPos-2]
	} else if dd.wrPos > 0 {
		return dd.hist[dd.wrPos-1], dd.hist[len(dd.hist)-1]
	} else {
		return dd.hist[len(dd.hist)-1], dd.hist[len(dd.hist)-2]
	}
}
648456
func (p *Pagination) FirstPage() bool {
	return p == nil || p.ForceFirstPage || (len(p.Next) == 0 && len(p.Previous) == 0)
}
683155
func (c *staticCursor) Last() ([]byte, []byte) {
	return c.getValueAtIndex(len(c.pairs) - 1 - c.idx)
}
459579
func (wp WeightedPages) Pages() Pages {
	pages := make(Pages, len(wp))
	for i := range wp {
		pages[i] = wp[i].Page
	}
	return pages
}
588763
func (s *IPCredentialList) LastPage() (*IPCredentialList, error) {
	return s.getPage(s.Meta.LastPageUri)
}
560975
func (l *ListMetricsOptions) AdvancePage(next *PaginationMeta) ListMetricsOptions {
	return ListMetricsOptions{
		PaginationMeta: next,
		Name:           l.Name,
	}
}
677354
func (c *IPMessageList) FirstPage() (*IPMessageList, error) {
	return c.getPage(c.Meta.FirstPageUri)
}