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_id: ZomeId,
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_id: ZomeId
link_type: LinkType
tag: LinkTag
weight: W
Trait Implementations
sourceimpl ActionBuilder<CreateLink<()>> for CreateLink
impl ActionBuilder<CreateLink<()>> for CreateLink
fn build(self, common: ActionBuilderCommon) -> CreateLink<()>
sourceimpl ActionUnweighed for CreateLink<()>
impl ActionUnweighed for CreateLink<()>
type Weighed = CreateLink<RateWeight>
type Weight = RateWeight
sourcefn 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 more
sourceimpl ActionWeighed for CreateLink
impl ActionWeighed for CreateLink
type Unweighed = CreateLink<()>
type Weight = RateWeight
sourcefn into_action(self) -> Action
fn into_action(self) -> Action
Construct the full Action enum with this variant.
sourcefn 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 more
sourceimpl<W: Clone> Clone for CreateLink<W>
impl<W: Clone> Clone for CreateLink<W>
sourcefn clone(&self) -> CreateLink<W>
fn clone(&self) -> CreateLink<W>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<W: Debug> Debug for CreateLink<W>
impl<W: Debug> Debug for CreateLink<W>
sourceimpl<'de, W> Deserialize<'de> for CreateLink<W> where
W: Deserialize<'de>,
impl<'de, W> Deserialize<'de> for CreateLink<W> where
W: Deserialize<'de>,
sourcefn 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
sourceimpl<W: Hash> Hash for CreateLink<W>
impl<W: Hash> Hash for CreateLink<W>
sourceimpl HashableContent for CreateLink
impl HashableContent for CreateLink
sourcefn 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
sourceimpl<W: PartialEq> PartialEq<CreateLink<W>> for CreateLink<W>
impl<W: PartialEq> PartialEq<CreateLink<W>> for CreateLink<W>
sourcefn eq(&self, other: &CreateLink<W>) -> bool
fn eq(&self, other: &CreateLink<W>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CreateLink<W>) -> bool
fn ne(&self, other: &CreateLink<W>) -> bool
This method tests for !=
.
sourceimpl<W> Serialize for CreateLink<W> where
W: Serialize,
impl<W> Serialize for CreateLink<W> where
W: Serialize,
sourceimpl<'a> TryFrom<&'a Action> for &'a CreateLink
impl<'a> TryFrom<&'a Action> for &'a CreateLink
sourceimpl 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.
sourcefn try_from(t: &CreateLink) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &CreateLink) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<Action> for CreateLink
impl TryFrom<Action> for CreateLink
sourceimpl 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.
sourcefn try_from(t: CreateLink) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: CreateLink) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<Record> for CreateLink
impl TryFrom<Record> for CreateLink
sourceimpl 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.
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.