pub struct SweetInlineZomes(pub InlineZomeSet);
Expand description

A helper for creating an InlineZomeSet consisting of a single integrity zome and a single coordinator zome.

Tuple Fieldsยง

ยง0: InlineZomeSet

Implementationsยง

sourceยง

impl SweetInlineZomes

source

pub const INTEGRITY: &'static str = "integrity"

Zome name for the integrity zome.

source

pub const COORDINATOR: &'static str = "coordinator"

Zome name for the coordinator zome.

source

pub fn new(entry_defs: Vec<EntryDef>, num_link_types: u8) -> Self

Create a single integrity zome with the ZomeName โ€œintegrityโ€ and coordinator zome with the ZomeName Coordinator.

source

pub fn integrity_function<F, I, O>(self, name: &str, f: F) -> Selfwhere F: Fn(BoxApi, I) -> InlineZomeResult<O> + 'static + Send + Sync, I: DeserializeOwned + Debug, O: Serialize + Debug,

Add a function to the integrity zome.

source

pub fn function<F, I, O>(self, name: &str, f: F) -> Selfwhere F: Fn(BoxApi, I) -> InlineZomeResult<O> + 'static + Send + Sync, I: DeserializeOwned + Debug, O: Serialize + Debug,

Add a function to the coordinator_zome.

source

pub fn integrity_callback<F, I, O>(self, name: &str, f: F) -> Selfwhere F: Fn(BoxApi, I) -> InlineZomeResult<O> + 'static + Send + Sync, I: DeserializeOwned + Debug, O: Serialize + Debug,

๐Ÿ‘ŽDeprecated: Alias for integrity_function

Alias for integrity_function

source

pub fn callback<F, I, O>(self, name: &str, f: F) -> Selfwhere F: Fn(BoxApi, I) -> InlineZomeResult<O> + 'static + Send + Sync, I: DeserializeOwned + Debug, O: Serialize + Debug,

๐Ÿ‘ŽDeprecated: Alias for function

Alias for function

Trait Implementationsยง

sourceยง

impl Default for SweetInlineZomes

sourceยง

fn default() -> SweetInlineZomes

Returns the โ€œdefault valueโ€ for a type. Read more
sourceยง

impl From<SweetInlineZomes> for InlineZomeSet

sourceยง

fn from(s: SweetInlineZomes) -> Self

Converts to this type from the input type.

Auto Trait Implementationsยง

Blanket Implementationsยง

sourceยง

impl<T> Any for Twhere T: 'static + ?Sized,

sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
ยง

impl<T> Any for Twhere T: Any,

ยง

fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

ยง

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>

ยง

fn type_name(&self) -> &'static str

ยง

impl<T> AnySync for Twhere T: Any + Send + Sync,

ยง

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync + 'static>

ยง

impl<T> ArchivePointee for T

ยง

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
ยง

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
sourceยง

impl<T> Borrow<T> for Twhere T: ?Sized,

sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
sourceยง

impl<T> BorrowMut<T> for Twhere T: ?Sized,

sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
ยง

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>

Deserializes using the given deserializer
sourceยง

impl<T> From<T> for T

sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

sourceยง

impl<T> Instrument for T

sourceยง

fn instrument(self, span: Span) -> Instrumented<Self> โ“˜

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
sourceยง

fn in_current_span(self) -> Instrumented<Self> โ“˜

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
sourceยง

impl<T> Instrument for T

sourceยง

fn instrument(self, span: Span) -> Instrumented<Self> โ“˜

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
sourceยง

fn in_current_span(self) -> Instrumented<Self> โ“˜

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
sourceยง

impl<T, U> Into<U> for Twhere U: From<T>,

sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

ยง

impl<T> Pointable for T

ยง

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
ยง

type Init = T

The type for initializers.
ยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
ยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
ยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
ยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
ยง

impl<T> Pointee for T

ยง

type Metadata = ()

The type for metadata in pointers and references to Self.
sourceยง

impl<T> Same<T> for T

ยง

type Output = T

Should always be Self
ยง

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

ยง

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
ยง

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
ยง

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
ยง

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
sourceยง

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

ยง

type Error = Infallible

The type returned in the event of a conversion error.
sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
sourceยง

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

ยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
ยง

impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,

ยง

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
ยง

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
ยง

fn upcast_any_box(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

upcast boxed dyn
ยง

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

ยง

fn vzip(self) -> V

sourceยง

impl<T> WithSubscriber for T

sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> โ“˜where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self> โ“˜

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
sourceยง

impl<T> WithSubscriber for T

sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> โ“˜where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self> โ“˜

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more