pub enum OpDef {
Get(GetOp),
Put(PutOp),
Post(PostOp),
Delete(DeleteOp),
}
Expand description
A user-defined operation.
Variants§
Implementations§
source§impl OpDef
impl OpDef
sourcepub fn dereference_self<State>(self, path: &TCPathBuf) -> Self
pub fn dereference_self<State>(self, path: &TCPathBuf) -> Self
Replace references to $self
with the given path
.
sourcepub fn form(&self) -> impl Iterator<Item = &(Id, Scalar)>
pub fn form(&self) -> impl Iterator<Item = &(Id, Scalar)>
Iterate over the internal state assignments of this OpDef
.
sourcepub fn is_inter_service_write<State>(
&self,
cluster_path: &[PathSegment]
) -> bool
pub fn is_inter_service_write<State>( &self, cluster_path: &[PathSegment] ) -> bool
Return true
if this OpDef
may execute a write operation to another service.
sourcepub fn into_form(self) -> Vec<(Id, Scalar)>
pub fn into_form(self) -> Vec<(Id, Scalar)>
Consume this OpDef
and return its internal state assignments.
sourcepub fn reference_self<State>(self, path: &TCPathBuf) -> Self
pub fn reference_self<State>(self, path: &TCPathBuf) -> Self
Replace references to the given path
with $self
.
Trait Implementations§
source§impl AsType<OpDef> for Scalar
impl AsType<OpDef> for Scalar
source§fn as_type_mut(&mut self) -> Option<&mut OpDef>
fn as_type_mut(&mut self) -> Option<&mut OpDef>
Borrow this instance mutably as an instance of
T
if possible.source§impl FromStream for OpDef
impl FromStream for OpDef
source§impl GetSize for OpDef
impl GetSize for OpDef
source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
source§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
source§impl<'a, State> Handler<'a, State> for OpDef
impl<'a, State> Handler<'a, State> for OpDef
fn get<'b>(self: Box<Self>) -> Option<GetHandler<'a, 'b, State::Txn, State>>where
'b: 'a,
fn put<'b>(self: Box<Self>) -> Option<PutHandler<'a, 'b, State::Txn, State>>where
'b: 'a,
fn post<'b>(self: Box<Self>) -> Option<PostHandler<'a, 'b, State::Txn, State>>where
'b: 'a,
fn delete<'b>(self: Box<Self>) -> Option<DeleteHandler<'a, 'b, State::Txn>>where
'b: 'a,
source§impl<'en> IntoStream<'en> for OpDef
impl<'en> IntoStream<'en> for OpDef
source§impl PartialEq for OpDef
impl PartialEq for OpDef
source§impl TryCastFrom<Scalar> for OpDef
impl TryCastFrom<Scalar> for OpDef
source§fn can_cast_from(scalar: &Scalar) -> bool
fn can_cast_from(scalar: &Scalar) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(scalar: Scalar) -> Option<Self>
fn opt_cast_from(scalar: Scalar) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.impl Eq for OpDef
impl StructuralPartialEq for OpDef
Auto Trait Implementations§
impl RefUnwindSafe for OpDef
impl Send for OpDef
impl Sync for OpDef
impl Unpin for OpDef
impl UnwindSafe for OpDef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<'en, T> FileLoad for T
impl<'en, T> FileLoad for T
§impl<'en, T> FileSave<'en> for T
impl<'en, T> FileSave<'en> for T
source§impl<F> Match for F
impl<F> Match for F
source§fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns
true
if self
can be cast into the target type T
.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
source§fn can_cast_from(_: &F) -> bool
fn can_cast_from(_: &F) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
source§fn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if
self
can be cast into T
.source§fn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns
Some(T)
if self
can be cast into T
, otherwise None
.