Skip to main content

Attribute

View as Markdown

This page lists the Rust SDK names for Attributes. The doc comment of each API gives its parameters, defaults, and errors. Read them in the Rust SDK API reference.

API names​

TaskRust APIDex behavior
Define a singleton AttributeAttributeAttributes
Define an AttributeMapAttributeMapAttributes
Declare it in the FlowPersistenceSchema::attribute and PersistenceSchema::attribute_map, returned from Flow::persistenceFlow definition
Read, write, and delete a value in a Step or RPCget, get_required, set, and deleteCommits
Address one AttributeMap instanceAttributeMap::instance, or the instance key argument of get, set, and deleteAttributes
Count AttributeMap instances and list their keysAttributeMap::map_size and AttributeMap::all_instance_keysSelective state loading
Load AttributeMap values for a methodAttributeMap::load, with the load methods of StepOptions or RpcSelective state loading
Lock a value for a read-modify-writelock, with wait_for_lock or execute_lock of StepOptions, or lock of RpcLocks
Index a value for searchindexed, with an AttributeIndex such as AttributeIndex::keywordIndexes
Project writes to an Attribute Storesync_to_attribute_storeAttribute sync
Store a value that can be erasedhard_delete_on_nullHard-delete Attributes
Set a value when the Flow startsStartFlowOptions::initial_attribute and StartFlowOptions::initial_attribute_mapAttributes at start
Read values from outside the FlowClient::get_attributesRead Attributes
Wait until a value matchesClient::wait_for_attribute_match and Client::wait_for_attribute_map_instance_match, with AttributeMatchWait for an Attribute match

Example​

Example: examples/rust/src/primitives/attribute/flow.rs