[−][src]Struct holochain_core_types::chain_header::ChainHeader
ChainHeader of a source chain "Item" The address of the ChainHeader is used as the Item's key in the source chain hash table ChainHeaders are linked to next header in chain and next header of same type in chain
Methods
impl ChainHeader
[src]
pub fn new(
entry_type: &EntryType,
entry_address: &Address,
provenances: &[Provenance],
link: &Option<Address>,
link_same_type: &Option<Address>,
link_update_delete: &Option<Address>,
timestamp: &Iso8601
) -> Self
[src]
entry_type: &EntryType,
entry_address: &Address,
provenances: &[Provenance],
link: &Option<Address>,
link_same_type: &Option<Address>,
link_update_delete: &Option<Address>,
timestamp: &Iso8601
) -> Self
build a new ChainHeader from a chain, entry type and entry. a ChainHeader is immutable, but the chain is mutable if chain.push() is used. this means that a header becomes invalid and useless as soon as the chain is mutated the only valid usage of a header is to immediately push it onto a chain in a Pair. normally (outside unit tests) the generation of valid headers is internal to the chain::SourceChain trait and should not need to be handled manually
@see chain::entry::Entry
pub fn entry_type(&self) -> &EntryType
[src]
entry_type getter
pub fn timestamp(&self) -> &Iso8601
[src]
timestamp getter
pub fn link(&self) -> Option<Address>
[src]
link getter
pub fn entry_address(&self) -> &Address
[src]
entry_address getter
pub fn link_same_type(&self) -> Option<Address>
[src]
link_same_type getter
pub fn link_update_delete(&self) -> Option<Address>
[src]
link_update_delete getter
pub fn provenances(&self) -> &Vec<Provenance>
[src]
entry_signature getter
Trait Implementations
impl<'a> From<&'a ChainHeader> for JsonString
[src]
fn from(v: &ChainHeader) -> JsonString
[src]
impl From<ChainHeader> for JsonString
[src]
fn from(v: ChainHeader) -> JsonString
[src]
impl Clone for ChainHeader
[src]
fn clone(&self) -> ChainHeader
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl PartialEq<ChainHeader> for ChainHeader
[src]
fn eq(&self, other: &ChainHeader) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Debug for ChainHeader
[src]
impl<'a> TryFrom<&'a JsonString> for ChainHeader
[src]
type Error = JsonError
The type returned in the event of a conversion error.
fn try_from(json_string: &JsonString) -> Result<Self, Self::Error>
[src]
impl TryFrom<JsonString> for ChainHeader
[src]
type Error = JsonError
The type returned in the event of a conversion error.
fn try_from(json_string: JsonString) -> Result<Self, Self::Error>
[src]
impl Serialize for ChainHeader
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for ChainHeader
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl AddressableContent for ChainHeader
[src]
fn content(&self) -> Content
[src]
fn try_from_content(content: &Content) -> JsonResult<Self>
[src]
fn address(&self) -> HashString
[src]
Auto Trait Implementations
impl Send for ChainHeader
impl Sync for ChainHeader
impl Unpin for ChainHeader
impl UnwindSafe for ChainHeader
impl RefUnwindSafe for ChainHeader
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,