Skip to main content

LinksOperation

Type Alias LinksOperation 

Source
pub type LinksOperation = GenericLinksOperation<u32>;
Expand description

The existing u32 links operation facade.

Aliased Type§

pub enum LinksOperation {
    Count(Vec<Option<u32>>),
    Each(Vec<Option<u32>>),
    Create {
        source: u32,
        target: u32,
    },
    Update {
        index: u32,
        source: u32,
        target: u32,
    },
    Delete(u32),
    GetName(u32),
    SetName(u32, String),
    GetByName(String),
    RemoveName(u32),
    Subscribe(Vec<Option<u32>>),
    Unsubscribe(u32),
}

Variants§

§

Count(Vec<Option<u32>>)

Number of links matching the restriction.

§

Each(Vec<Option<u32>>)

Every link matching the restriction, ordered by index.

§

Create

Creates a link.

Fields

§source: u32
§target: u32
§

Update

Points an existing link at a new source and target; an update that would duplicate an existing link merges into it instead.

Fields

§index: u32
§source: u32
§target: u32
§

Delete(u32)

Deletes a link, and every link that still refers to it.

§

GetName(u32)

The name of a link.

§

SetName(u32, String)

Names a link.

§

GetByName(String)

The link with a name.

§

RemoveName(u32)

Removes the name of a link.

§

Subscribe(Vec<Option<u32>>)

Asks a LinksServer to push the changes other connections make to the links matching the restriction; the reply is (subscription: N) and every later push a notification_document.

A subscription belongs to the connection that made it: only the server can run it, so execute on a store fails.

§

Unsubscribe(u32)

Stops a subscription of this connection; the reply is empty, even for an unknown number.