pub trait Group {
// Required methods
fn gate(
&self,
gate: &Hash,
settings: Option<GateSettings>,
) -> Option<Box<dyn Gate>>;
fn cursor(&self, gate: &Hash) -> Box<dyn ForkCursor>;
}
Required Methods§
Sourcefn gate(
&self,
gate: &Hash,
settings: Option<GateSettings>,
) -> Option<Box<dyn Gate>>
fn gate( &self, gate: &Hash, settings: Option<GateSettings>, ) -> Option<Box<dyn Gate>>
Open up a gate, which lets members of this group open a cursor in your database starting from the given hash. Dropping the Gate closes it.
Multiple gates can be open at once, but gates with overlapping parameters cannot be open at the same hash, in which case this function should return None.
For a given hash:
- If a gate is open without a specific node listed, no other gates may be opened.
- If at least one gate is open with a specific node listed, other gates with specific nodes may be opened, but all nodes across open gates must be unique.
Sourcefn cursor(&self, gate: &Hash) -> Box<dyn ForkCursor>
fn cursor(&self, gate: &Hash) -> Box<dyn ForkCursor>
Prepare a new cursor for use, starting from the given hash.