Struct tinychain::txn::Txn [−][src]
pub struct Txn { /* fields omitted */ }
A transaction context.
Implementations
impl Txn
[src]
impl Txn
[src]pub fn ref_count(&self) -> usize
[src]
Return the current number of strong references to this Txn
.
pub async fn claim(
self,
actor: &Actor,
cluster_path: TCPathBuf
) -> TCResult<Self>
[src]
self,
actor: &Actor,
cluster_path: TCPathBuf
) -> TCResult<Self>
Claim ownership of this transaction.
pub async fn grant(
&self,
actor: &Actor,
cluster_path: TCPathBuf,
scopes: Vec<Scope>
) -> TCResult<Self>
[src]
&self,
actor: &Actor,
cluster_path: TCPathBuf,
scopes: Vec<Scope>
) -> TCResult<Self>
pub fn is_owner(&self, cluster_path: &[PathSegment]) -> bool
[src]
Check if the cluster at the specified path on this host is the owner of the transaction.
pub fn owner(&self) -> Option<&Link>
[src]
Return the owner of this transaction, if there is one.
pub fn link(&self, path: TCPathBuf) -> Link
[src]
Return a link to the given path on this host.
pub fn request(&self) -> &Request
[src]
Return the Request
which initiated this transaction on this host.
pub async fn get(&self, link: Link, key: Value) -> TCResult<State>
[src]
Resolve a GET op within this transaction context.
pub async fn put(&self, link: Link, key: Value, value: State) -> TCResult<()>
[src]
Resolve a PUT op within this transaction context.
pub async fn post(&self, link: Link, params: State) -> TCResult<State>
[src]
Resolve a POST op within this transaction context.
pub async fn delete(&self, link: Link, key: Value) -> TCResult<()>
[src]
Resolve a DELETE op within this transaction context.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Txn
impl !RefUnwindSafe for Txn
impl !UnwindSafe for Txn
impl !UnwindSafe for Txn
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]pub fn can_cast_from(&F) -> bool
[src]
pub fn opt_cast_from(f: F) -> Option<T>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
[src]
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
[src]pub fn can_cast_into(&self) -> bool
[src]
pub fn opt_cast_into(self) -> Option<T>
[src]
pub fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
[src]
OnErr: FnOnce(&Self) -> Err,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,