Struct tinychain::txn::Txn [−][src]
A transaction context.
Implementations
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 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 fn scopes(&self, actor_id: &Value) -> Option<&Vec<Scope>>
[src]
Return the Scope
s which the given user is authorized for on this transaction.
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.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Txn
[src]
impl Send for Txn
[src]
impl Sync for Txn
[src]
impl Unpin for Txn
[src]
impl !UnwindSafe for Txn
[src]
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<F, T> CastFrom<F> for T where
T: From<F>,
[src]
T: From<F>,
impl<T, F> CastInto<F> for T where
F: CastFrom<T>,
[src]
F: CastFrom<T>,
impl<T> From<T> 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> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F> Match for F
[src]
pub fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
[src]
T: TryCastFrom<Self>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]
T: CastFrom<F>,
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]
T: TryCastFrom<F>,
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<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>,