pub struct TypedPath {
pub link_type: ScopedLinkType,
pub path: Path,
}
Expand description
Fields
link_type: ScopedLinkType
The LinkType
within the scope of the zome where it’s defined.
path: Path
Implementations
sourceimpl TypedPath
impl TypedPath
sourcepub fn new(link_type: impl Into<ScopedLinkType>, path: Path) -> Self
pub fn new(link_type: impl Into<ScopedLinkType>, path: Path) -> Self
sourcepub fn exists(&self) -> ExternResult<bool>
pub fn exists(&self) -> ExternResult<bool>
Does an entry exist at the hash we expect?
sourcepub fn ensure(&self) -> ExternResult<()>
pub fn ensure(&self) -> ExternResult<()>
Recursively touch this and every parent that doesn’t exist yet.
sourcepub fn parent(&self) -> Option<Self>
pub fn parent(&self) -> Option<Self>
The parent of the current path is simply the path truncated one level.
sourcepub fn children(&self) -> ExternResult<Vec<Link>>
pub fn children(&self) -> ExternResult<Vec<Link>>
Touch and list all the links from this path to paths below it. Only returns links between paths, not to other entries that might have their own links.
sourcepub fn children_paths(&self) -> ExternResult<Vec<Self>>
pub fn children_paths(&self) -> ExternResult<Vec<Self>>
Touch and list all the links from this path to paths below it.
Same as Path::children
but returns Vec<Path>
rather than Vec<Link>
.
This is more than just a convenience. In general it’s not possible to
construct a full Path
from a child Link
alone as only a single
Component
is encoded into the link tag. To build a full child path
the parent path + child link must be combined, which this function does
to produce each child, by using &self
as that parent.
pub fn children_details(&self) -> ExternResult<LinkDetails>
Methods from Deref<Target = Path>
sourcepub fn path_entry_hash(&self) -> ExternResult<EntryHash>
pub fn path_entry_hash(&self) -> ExternResult<EntryHash>
What is the hash for the current Path
?
Trait Implementations
sourceimpl<'de> Deserialize<'de> for TypedPath
impl<'de> Deserialize<'de> for TypedPath
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>,
sourceimpl TryFrom<&TypedPath> for SerializedBytes
impl TryFrom<&TypedPath> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
sourcefn try_from(t: &TypedPath) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &TypedPath) -> Result<SerializedBytes, SerializedBytesError>
sourceimpl TryFrom<SerializedBytes> for TypedPath
impl TryFrom<SerializedBytes> for TypedPath
type Error = SerializedBytesError
type Error = SerializedBytesError
sourcefn try_from(sb: SerializedBytes) -> Result<TypedPath, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<TypedPath, SerializedBytesError>
sourceimpl TryFrom<TypedPath> for SerializedBytes
impl TryFrom<TypedPath> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
sourcefn try_from(t: TypedPath) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: TypedPath) -> Result<SerializedBytes, SerializedBytesError>
impl StructuralPartialEq for TypedPath
Auto Trait Implementations
impl RefUnwindSafe for TypedPath
impl Send for TypedPath
impl Sync for TypedPath
impl Unpin for TypedPath
impl UnwindSafe for TypedPath
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
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> 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;
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;