Struct holochain_integrity_types::action::CreateLink
source · pub struct CreateLink<W = RateWeight> {
pub author: AgentPubKey,
pub timestamp: Timestamp,
pub action_seq: u32,
pub prev_action: ActionHash,
pub base_address: AnyLinkableHash,
pub target_address: AnyLinkableHash,
pub zome_index: ZomeIndex,
pub link_type: LinkType,
pub tag: LinkTag,
pub weight: W,
}
Expand description
Declares that a metadata Link should be made between two EntryHashes
Fields§
§timestamp: Timestamp
§action_seq: u32
§prev_action: ActionHash
§base_address: AnyLinkableHash
§target_address: AnyLinkableHash
§zome_index: ZomeIndex
§link_type: LinkType
§tag: LinkTag
§weight: W
Trait Implementations§
source§impl ActionBuilder<CreateLink<()>> for CreateLink
impl ActionBuilder<CreateLink<()>> for CreateLink
fn build(self, common: ActionBuilderCommon) -> CreateLink<()>
source§impl ActionUnweighed for CreateLink<()>
impl ActionUnweighed for CreateLink<()>
type Weighed = CreateLink<RateWeight>
type Weight = RateWeight
source§fn weighed(self, weight: RateWeight) -> CreateLink
fn weighed(self, weight: RateWeight) -> CreateLink
Add a weight to this unweighed action, making it “weighed”.
The weight is determined by the
weigh
callback, which is run on the
unweighed version of this action. Read moresource§impl ActionWeighed for CreateLink
impl ActionWeighed for CreateLink
type Unweighed = CreateLink<()>
type Weight = RateWeight
source§fn into_action(self) -> Action
fn into_action(self) -> Action
Construct the full Action enum with this variant.
source§fn unweighed(self) -> CreateLink<()>
fn unweighed(self) -> CreateLink<()>
Erase the rate limiting weight info, creating an “unweighed” version
of this action. This is used primarily by validators who need to run the
weigh
callback on an action they received, and want to make sure their
callback is not using the predefined weight to influence the result. Read moresource§impl<W: Clone> Clone for CreateLink<W>
impl<W: Clone> Clone for CreateLink<W>
source§fn clone(&self) -> CreateLink<W>
fn clone(&self) -> CreateLink<W>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<W: Debug> Debug for CreateLink<W>
impl<W: Debug> Debug for CreateLink<W>
source§impl<'de, W> Deserialize<'de> for CreateLink<W>where
W: Deserialize<'de>,
impl<'de, W> Deserialize<'de> for CreateLink<W>where
W: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<W: Hash> Hash for CreateLink<W>
impl<W: Hash> Hash for CreateLink<W>
source§impl HashableContent for CreateLink
impl HashableContent for CreateLink
source§fn hashable_content(&self) -> HashableContentBytes
fn hashable_content(&self) -> HashableContentBytes
Return a subset of the content, either as SerializedBytes “content”,
which will be used to compute the hash, or as an already precomputed
hash which will be used directly Read more
source§impl<W: PartialEq> PartialEq<CreateLink<W>> for CreateLink<W>
impl<W: PartialEq> PartialEq<CreateLink<W>> for CreateLink<W>
source§fn eq(&self, other: &CreateLink<W>) -> bool
fn eq(&self, other: &CreateLink<W>) -> bool
source§impl<W> Serialize for CreateLink<W>where
W: Serialize,
impl<W> Serialize for CreateLink<W>where
W: Serialize,
source§impl<'a> TryFrom<&'a Action> for &'a CreateLink
impl<'a> TryFrom<&'a Action> for &'a CreateLink
source§impl TryFrom<&CreateLink<RateWeight>> for SerializedBytes
impl TryFrom<&CreateLink<RateWeight>> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
source§fn try_from(t: &CreateLink) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &CreateLink) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
source§impl TryFrom<Action> for CreateLink
impl TryFrom<Action> for CreateLink
source§impl TryFrom<CreateLink<RateWeight>> for SerializedBytes
impl TryFrom<CreateLink<RateWeight>> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
source§fn try_from(t: CreateLink) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: CreateLink) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
source§impl TryFrom<Record<SignedHashed<Action>>> for CreateLink
impl TryFrom<Record<SignedHashed<Action>>> for CreateLink
source§impl TryFrom<SerializedBytes> for CreateLink
impl TryFrom<SerializedBytes> for CreateLink
§type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
source§fn try_from(sb: SerializedBytes) -> Result<CreateLink, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<CreateLink, SerializedBytesError>
Performs the conversion.
impl<W: Eq> Eq for CreateLink<W>
impl<W> StructuralEq for CreateLink<W>
impl<W> StructuralPartialEq for CreateLink<W>
Auto Trait Implementations§
impl<W> RefUnwindSafe for CreateLink<W>where
W: RefUnwindSafe,
impl<W> Send for CreateLink<W>where
W: Send,
impl<W> Sync for CreateLink<W>where
W: Sync,
impl<W> Unpin for CreateLink<W>where
W: Unpin,
impl<W> UnwindSafe for CreateLink<W>where
W: UnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.