pub struct PathEntry(_);
Expand description
A PathEntry
is the hash of a Path
.
This is what is committed and shared on the DHT to build links off as their
base and target. If we committed the Path
directly then the size of each
node entry content would be the size of all the components of the path.
Given that ensure
populates all the ancestor nodes committing [ A, B, C ]
would create entries with content [ A ], [ A, B ], [ A, B, C ]. For deep
paths, or paths with a large component (in bytes) at any node, this would
create a lot of redundant data in every descendent entry.
Instead, we commit a PathEntry
so each node is constant size, just the
hash of the full Path
up to that point. This means that committing
PathEntry
instead of Path
for [A, B, C]
results in entries with
content [ HashA ], [ HashAB ], [ HashABC ]. Note that if A + B + C is much
less than the size of a holochain hash (~40 bytes) then this approach is
worse than simply committing the Path
but in practise this is often not
the case, and PathEntry
becomes a more scalable generalised solution.
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for PathEntry
impl<'de> Deserialize<'de> for PathEntry
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 EntryDefRegistration for PathEntry
impl EntryDefRegistration for PathEntry
fn entry_def() -> EntryDef
fn entry_def_id() -> EntryDefId
fn entry_visibility() -> EntryVisibility
fn crdt_type() -> CrdtType
fn required_validations() -> RequiredValidations
sourceimpl From<&'_ PathEntry> for EntryDefId where
PathEntry: EntryDefRegistration,
impl From<&'_ PathEntry> for EntryDefId where
PathEntry: EntryDefRegistration,
sourceimpl From<&'_ PathEntry> for EntryVisibility where
PathEntry: EntryDefRegistration,
impl From<&'_ PathEntry> for EntryVisibility where
PathEntry: EntryDefRegistration,
sourceimpl From<&'_ PathEntry> for RequiredValidations where
PathEntry: EntryDefRegistration,
impl From<&'_ PathEntry> for RequiredValidations where
PathEntry: EntryDefRegistration,
sourceimpl From<PathEntry> for EntryDefId where
PathEntry: EntryDefRegistration,
impl From<PathEntry> for EntryDefId where
PathEntry: EntryDefRegistration,
sourceimpl From<PathEntry> for EntryVisibility where
PathEntry: EntryDefRegistration,
impl From<PathEntry> for EntryVisibility where
PathEntry: EntryDefRegistration,
sourceimpl From<PathEntry> for RequiredValidations where
PathEntry: EntryDefRegistration,
impl From<PathEntry> for RequiredValidations where
PathEntry: EntryDefRegistration,
sourceimpl TryFrom<&'_ PathEntry> for SerializedBytes
impl TryFrom<&'_ PathEntry> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: &PathEntry) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &PathEntry) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<&'_ PathEntry> for AppEntryBytes
impl TryFrom<&'_ PathEntry> for AppEntryBytes
sourceimpl TryFrom<&'_ PathEntry> for CreateInput where
PathEntry: EntryDefRegistration,
impl TryFrom<&'_ PathEntry> for CreateInput where
PathEntry: EntryDefRegistration,
sourceimpl TryFrom<HoloHashed<Entry>> for PathEntry
impl TryFrom<HoloHashed<Entry>> for PathEntry
sourceimpl TryFrom<PathEntry> for SerializedBytes
impl TryFrom<PathEntry> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: PathEntry) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: PathEntry) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<PathEntry> for AppEntryBytes
impl TryFrom<PathEntry> for AppEntryBytes
sourceimpl TryFrom<PathEntry> for CreateInput
impl TryFrom<PathEntry> for CreateInput
sourceimpl TryFrom<SerializedBytes> for PathEntry
impl TryFrom<SerializedBytes> for PathEntry
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(sb: SerializedBytes) -> Result<PathEntry, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<PathEntry, SerializedBytesError>
Performs the conversion.
impl StructuralPartialEq for PathEntry
Auto Trait Implementations
impl RefUnwindSafe for PathEntry
impl Send for PathEntry
impl Sync for PathEntry
impl Unpin for PathEntry
impl UnwindSafe for PathEntry
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<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more