Skip to main content

GraphMutationFootprint

Struct GraphMutationFootprint 

Source
pub struct GraphMutationFootprint {
    pub graph: bool,
    pub imports: BTreeSet<GraphId>,
    pub symbols: BTreeSet<SymbolId>,
    pub nodes: BTreeSet<NodeId>,
    pub ports: BTreeSet<PortId>,
    pub edges: BTreeSet<EdgeId>,
    pub groups: BTreeSet<GroupId>,
    pub sticky_notes: BTreeSet<StickyNoteId>,
    pub bindings: BTreeSet<BindingId>,
}
Expand description

Model ids touched by one graph mutation.

This is intentionally separate from graph storage. Hosts can use it to invalidate indexes, identify collaboration conflict/dependency boundaries, or derive more specific downstream work.

Fields§

§graph: bool

The graph document itself was touched.

§imports: BTreeSet<GraphId>

Import records or import references touched by the mutation.

§symbols: BTreeSet<SymbolId>

Symbol records touched by the mutation.

§nodes: BTreeSet<NodeId>

Node records or node references touched by the mutation.

§ports: BTreeSet<PortId>

Port records or port references touched by the mutation.

§edges: BTreeSet<EdgeId>

Edge records or edge references touched by the mutation.

§groups: BTreeSet<GroupId>

Group records or group references touched by the mutation.

§sticky_notes: BTreeSet<StickyNoteId>

Sticky note records or sticky note references touched by the mutation.

§bindings: BTreeSet<BindingId>

Binding records touched by the mutation.

Implementations§

Source§

impl GraphMutationFootprint

Source

pub fn new() -> Self

Creates an empty footprint.

Source

pub fn is_empty(&self) -> bool

Returns true when this footprint does not touch any graph-local object.

Source

pub fn extend(&mut self, other: Self)

Merges another footprint into this one.

Source

pub fn touch_graph(&mut self)

Marks the whole graph document as touched.

Source

pub fn touch_node(&mut self, id: NodeId)

Marks a node id as touched.

Source

pub fn touch_port(&mut self, id: PortId)

Marks a port id as touched.

Source

pub fn touch_edge(&mut self, id: EdgeId)

Marks an edge id as touched.

Source

pub fn touch_group(&mut self, id: GroupId)

Marks a group id as touched.

Source

pub fn touch_sticky_note(&mut self, id: StickyNoteId)

Marks a sticky note id as touched.

Source

pub fn touch_binding(&mut self, id: BindingId)

Marks a binding id as touched.

Source

pub fn touch_import(&mut self, id: GraphId)

Marks an import id as touched.

Source

pub fn touch_symbol(&mut self, id: SymbolId)

Marks a symbol id as touched.

Source

pub fn touch_node_snapshot(&mut self, id: NodeId, node: &Node)

Marks ids referenced by a node snapshot.

Source

pub fn touch_port_snapshot(&mut self, id: PortId, port: &Port)

Marks ids referenced by a port snapshot.

Source

pub fn touch_edge_snapshot(&mut self, id: EdgeId, edge: &Edge)

Marks ids referenced by an edge snapshot.

Source

pub fn touch_edge_endpoints(&mut self, endpoints: EdgeEndpoints)

Marks ids referenced by edge endpoint ports.

Source

pub fn touch_binding_snapshot(&mut self, id: BindingId, binding: &Binding)

Marks ids referenced by a binding snapshot.

Source

pub fn touch_binding_endpoint(&mut self, endpoint: &BindingEndpoint)

Marks ids referenced by one binding endpoint.

Trait Implementations§

Source§

impl Clone for GraphMutationFootprint

Source§

fn clone(&self) -> GraphMutationFootprint

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GraphMutationFootprint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GraphMutationFootprint

Source§

fn default() -> GraphMutationFootprint

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GraphMutationFootprint

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for GraphMutationFootprint

Source§

impl PartialEq for GraphMutationFootprint

Source§

fn eq(&self, other: &GraphMutationFootprint) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for GraphMutationFootprint

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for GraphMutationFootprint

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.