core.rs
1 use apibara_core::node::v1alpha2::Cursor as ProtoCursor; 2 3 /// A cursor is a position in a stream. 4 pub trait Cursor: Sized + Default + Clone + std::fmt::Debug { 5 /// Create a new cursor from a proto cursor. 6 fn from_proto(cursor: &ProtoCursor) -> Option<Self>; 7 8 /// Returns the proto cursor. 9 fn to_proto(&self) -> ProtoCursor; 10 }