pub enum TripletsOperation {
Count(Vec<Part>),
Each(Vec<Part>),
Create {
type_id: u32,
from: u32,
to: u32,
},
Update {
index: u32,
type_id: u32,
from: u32,
to: u32,
},
Delete(u32),
Subscribe(Vec<Part>),
}Expand description
One call of the Triplets interface.
Variants§
Count(Vec<Part>)
Number of triplets matching the restriction.
Each(Vec<Part>)
Every triplet matching the restriction, ordered by index.
Create
Creates a triplet; (0 0 0) creates a point, its own type.
Update
Makes an existing triplet (index: type from to), keeping its address.
Delete(u32)
Deletes a triplet and every triplet that uses it.
Subscribe(Vec<Part>)
Asks a LinksServer to push the changes other
connections make to the triplets matching the restriction; only the
server can run it, so execute on a store fails.
Implementations§
Source§impl TripletsOperation
impl TripletsOperation
Sourcepub fn to_document(&self) -> LinoDocument
pub fn to_document(&self) -> LinoDocument
The request document for this operation.
Sourcepub fn from_document(document: &[LiNo<String>]) -> ProtocolResult<Option<Self>>
pub fn from_document(document: &[LiNo<String>]) -> ProtocolResult<Option<Self>>
Recognises a triplet operation; Ok(None) for any other document, such
as a substitution query or a request about names.
Trait Implementations§
Source§impl Clone for TripletsOperation
impl Clone for TripletsOperation
Source§impl Debug for TripletsOperation
impl Debug for TripletsOperation
impl Eq for TripletsOperation
Source§impl PartialEq for TripletsOperation
impl PartialEq for TripletsOperation
impl StructuralPartialEq for TripletsOperation
Auto Trait Implementations§
impl Freeze for TripletsOperation
impl RefUnwindSafe for TripletsOperation
impl Send for TripletsOperation
impl Sync for TripletsOperation
impl Unpin for TripletsOperation
impl UnsafeUnpin for TripletsOperation
impl UnwindSafe for TripletsOperation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more