[][src]Module hdk::prelude

Types required by all but the most trivial zomes. This can greatly simplify imports for the majority of developers by simply adding use hdk::prelude::*;

Re-exports

pub use crate::define_zome;
pub use crate::entry;
pub use crate::from;
pub use crate::link;
pub use crate::load_json;
pub use crate::to;
pub use crate::entry_definition::ValidatingEntryType;
pub use crate::error::ZomeApiError;
pub use crate::error::ZomeApiResult;

Structs

AgentId

AgentId represents an agent in the Holochain framework. This data struct is meant be stored in the CAS and source-chain. Its key is the public signing key, and is also used as its address.

CommitEntryOptions

Structure used to specify additional options to a commit_entry_result call.

EntryHistory

Structure that holds a whole crud status history if the status request in the GetEntryOptions was set to StatusRequestKind::All

GetEntryOptions

Structure used to specify what should be returned to a call to get_entry_result() The default is to return the latest entry.

GetEntryResult
GetLinksOptions
GetLinksResult
GetLinksResultCount
JsonString

track json serialization with the rust type system! JsonString wraps a string containing JSON serialized data avoid accidental double-serialization or forgetting to serialize serialize any type consistently including hard-to-reach places like Option and Result JsonString must not itself be serialized/deserialized instead, implement and use the native From trait to move between types

QueryArgsOptions

Enums

Entry

Structure holding actual data in a source chain "Item" data is stored as a JsonString

EntryType
EntryValidationData

This struct carries information needed for Validating Entry Data, It is passed between callbacks and allows the user to validate using each supplied variant.

GetEntryResultType
HolochainError

TODO rename to CoreErrorKind Enum holding all Holochain Core errors

JsonError
LinkMatch
LinkValidationData

This struct carries information needed for Validating Link Data, It is passed between callbacks and allows the user to validate using each supplied variant.

LinksStatusRequestKind
QueryResult
Sharing

Enum for Zome EntryType "sharing" property.

StatusRequestKind
ValidationPackageDefinition

Traits

AddressableContent

can be stored as serialized content the content is the address, there is no "location" like a file system or URL @see https://en.wikipedia.org/wiki/Content-addressable_storage

Type Definitions

Address

an Address for some Content ideally would be the Content but pragmatically must be Address consider what would happen if we had multi GB addresses...

Derive Macros

DefaultJson
Deserialize
Serialize