pub struct ChannelHandler { /* private fields */ }
Expand description
Protocol handler
Implementations§
Trait Implementations§
Source§impl Handler for ChannelHandler
impl Handler for ChannelHandler
Source§fn for_new_client(
&self,
_client_id: u64,
_peer_id: PubKey,
_dbid: u64,
) -> ChannelHandler
fn for_new_client( &self, _client_id: u64, _peer_id: PubKey, _dbid: u64, ) -> ChannelHandler
Create a channel handler
Source§fn node(&self) -> &Arc<Node>
fn node(&self) -> &Arc<Node>
Get the associated signing node.
Note that if you want to perform an operation that can result in a mutation
of the node state requiring a persist, and your persister writes to the cloud,
you must use
Handler::with_persist
instead.Source§fn with_persist(&self, f: impl FnOnce(&Node) -> Result<()>) -> Result<Mutations>
fn with_persist(&self, f: impl FnOnce(&Node) -> Result<()>) -> Result<Mutations>
Perform an operation on the Node that requires persistence.
The operation must not mutate if it fails (returns an error).
You must call
Handler::commit
after you persist the mutations in the
cloud.Auto Trait Implementations§
impl Freeze for ChannelHandler
impl !RefUnwindSafe for ChannelHandler
impl Send for ChannelHandler
impl Sync for ChannelHandler
impl Unpin for ChannelHandler
impl !UnwindSafe for ChannelHandler
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
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more