Struct hdk::hash_path::anchor::Anchor [−][src]
An anchor can only be 1 or 2 levels deep as “type” and “text”.
The second level is optional and the Strings use the standard TryInto
for path Component
internally.
Anchors are required to be included in an application’s entry_defs
callback and so implement all the standard methods.
Technically the Anchor
entry definition is the Path
definition.
e.g. entry_defs![Anchor::entry_def()]
The methods implemented on anchor follow the patterns that predate the Path module but Path::from(&anchor)
is always possible to use the newer APIs.
Fields
anchor_type: String
anchor_text: Option<String>
Trait Implementations
impl Clone for Anchor
[src]
impl Debug for Anchor
[src]
impl<'de> Deserialize<'de> for Anchor
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl EntryDefRegistration for Anchor
[src]
fn entry_def() -> EntryDef
[src]
fn entry_def_id() -> EntryDefId
[src]
fn entry_visibility() -> EntryVisibility
[src]
fn crdt_type() -> CrdtType
[src]
fn required_validations() -> RequiredValidations
[src]
impl From<&'_ Anchor> for EntryDef where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl From<&'_ Anchor> for EntryDefId where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl From<&'_ Anchor> for EntryVisibility where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl From<&'_ Anchor> for CrdtType where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl From<&'_ Anchor> for RequiredValidations where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl From<&'_ Anchor> for Path
[src]
Anchors are just a special case of path, so we can move from anchor to path losslessly. We simply format the anchor structure into a string that works with the path string handling.
impl From<Anchor> for EntryDef where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl From<Anchor> for EntryDefId where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl From<Anchor> for EntryVisibility where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl From<Anchor> for CrdtType where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl From<Anchor> for RequiredValidations where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
impl PartialEq<Anchor> for Anchor
[src]
impl Serialize for Anchor
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Anchor
[src]
impl TryFrom<&'_ Anchor> for SerializedBytes
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(t: &Anchor) -> Result<SerializedBytes, SerializedBytesError>
[src]
impl TryFrom<&'_ Anchor> for Entry
[src]
type Error = WasmError
The type returned in the event of a conversion error.
fn try_from(t: &Anchor) -> Result<Self, Self::Error>
[src]
impl TryFrom<&'_ Anchor> for EntryWithDefId where
Anchor: EntryDefRegistration,
[src]
Anchor: EntryDefRegistration,
type Error = WasmError
The type returned in the event of a conversion error.
fn try_from(t: &Anchor) -> Result<Self, Self::Error>
[src]
impl TryFrom<&'_ Entry> for Anchor
[src]
type Error = WasmError
The type returned in the event of a conversion error.
fn try_from(entry: &Entry) -> Result<Self, Self::Error>
[src]
impl TryFrom<&'_ Path> for Anchor
[src]
Paths are more general than anchors so a path could be represented that is not a valid anchor. The obvious example would be a path of binary data that is not valid utf-8 strings or a path that is more than 2 levels deep.
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(path: &Path) -> Result<Self, Self::Error>
[src]
impl TryFrom<Anchor> for SerializedBytes
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(t: Anchor) -> Result<SerializedBytes, SerializedBytesError>
[src]
impl TryFrom<Anchor> for Entry
[src]
type Error = WasmError
The type returned in the event of a conversion error.
fn try_from(t: Anchor) -> Result<Self, Self::Error>
[src]
impl TryFrom<Anchor> for EntryWithDefId
[src]
type Error = WasmError
The type returned in the event of a conversion error.
fn try_from(t: Anchor) -> Result<Self, Self::Error>
[src]
impl TryFrom<Entry> for Anchor
[src]
type Error = WasmError
The type returned in the event of a conversion error.
fn try_from(entry: Entry) -> Result<Self, Self::Error>
[src]
impl TryFrom<SerializedBytes> for Anchor
[src]
type Error = SerializedBytesError
The type returned in the event of a conversion error.
fn try_from(sb: SerializedBytes) -> Result<Anchor, SerializedBytesError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Anchor
impl Send for Anchor
impl Sync for Anchor
impl Unpin for Anchor
impl UnwindSafe for Anchor
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub 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;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub 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;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,