[−][src]Struct session_types::Chan
A session typed channel. P
is the protocol and E
is the environment,
containing potential recursion targets
Methods
impl<E> Chan<E, Eps>
[src]
impl<E, P, A: Send + 'static> Chan<E, Send<A, P>>
[src]
#[must_use]
pub fn send(self, v: A) -> Chan<E, P>
[src]
Send a value of type A
over the channel. Returns a channel with
protocol P
impl<E, P, A: Send + 'static> Chan<E, Recv<A, P>>
[src]
#[must_use]
pub fn recv(self) -> (Chan<E, P>, A)
[src]
Receives a value of type A
from the channel. Returns a tuple
containing the resulting channel and the received value.
#[must_use]
pub fn try_recv(self) -> Result<(Chan<E, P>, A), Self>
[src]
Non-blocking receive.
impl<E, P, Q> Chan<E, Choose<P, Q>>
[src]
#[must_use]
pub fn sel1(self) -> Chan<E, P>
[src]
Perform an active choice, selecting protocol P
.
#[must_use]
pub fn sel2(self) -> Chan<E, Q>
[src]
Perform an active choice, selecting protocol Q
.
impl<Z, A, B> Chan<Z, Choose<A, B>>
[src]
Convenience function. This is identical to .sel2()
impl<Z, A, B, C> Chan<Z, Choose<A, Choose<B, C>>>
[src]
Convenience function. This is identical to .sel2().sel2()
impl<Z, A, B, C, D> Chan<Z, Choose<A, Choose<B, Choose<C, D>>>>
[src]
Convenience function. This is identical to .sel2().sel2().sel2()
impl<Z, A, B, C, D, E> Chan<Z, Choose<A, Choose<B, Choose<C, Choose<D, E>>>>>
[src]
Convenience function. This is identical to .sel2().sel2().sel2().sel2()
impl<Z, A, B, C, D, E, F> Chan<Z, Choose<A, Choose<B, Choose<C, Choose<D, Choose<E, F>>>>>>
[src]
Convenience function. This is identical to .sel2().sel2().sel2().sel2().sel2()
impl<Z, A, B, C, D, E, F, G> Chan<Z, Choose<A, Choose<B, Choose<C, Choose<D, Choose<E, Choose<F, G>>>>>>>
[src]
Convenience function.
impl<Z, A, B, C, D, E, F, G, H> Chan<Z, Choose<A, Choose<B, Choose<C, Choose<D, Choose<E, Choose<F, Choose<G, H>>>>>>>>
[src]
Convenience function.
impl<E, P, Q> Chan<E, Offer<P, Q>>
[src]
#[must_use]
pub fn offer(self) -> Branch<Chan<E, P>, Chan<E, Q>>
[src]
Passive choice. This allows the other end of the channel to select one
of two options for continuing the protocol: either P
or Q
.
#[must_use]
pub fn try_offer(self) -> Result<Branch<Chan<E, P>, Chan<E, Q>>, Self>
[src]
Poll for choice.
impl<E, P> Chan<E, Rec<P>>
[src]
#[must_use]
pub fn enter(self) -> Chan<(P, E), P>
[src]
Enter a recursive environment, putting the current environment on the top of the environment stack.
impl<E, P> Chan<(P, E), Var<Z>>
[src]
#[must_use]
pub fn zero(self) -> Chan<(P, E), P>
[src]
Recurse to the environment on the top of the environment stack.
impl<E, P, N> Chan<(P, E), Var<S<N>>>
[src]
#[must_use]
pub fn succ(self) -> Chan<E, Var<N>>
[src]
Pop the top environment from the environment stack.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,