pub struct NodeEventSource { /* private fields */ }
Expand description
Source of events from the local Radicle node.
Implementations§
Source§impl NodeEventSource
impl NodeEventSource
Sourcepub fn new(profile: &Profile) -> Result<Self, NodeEventError>
pub fn new(profile: &Profile) -> Result<Self, NodeEventError>
Create a new source of node events, for a given Radicle profile.
Sourcepub fn node_event(&mut self) -> Result<Option<Event>, NodeEventError>
pub fn node_event(&mut self) -> Result<Option<Event>, NodeEventError>
Get the next node event from an event source, without filtering. This will block until there is an event, or until there will be no more events from this source, or there’s an error.
A closed or broken connection to the node is not an error, it’s treated as end of file.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeEventSource
impl !RefUnwindSafe for NodeEventSource
impl !Send for NodeEventSource
impl !Sync for NodeEventSource
impl Unpin for NodeEventSource
impl !UnwindSafe for NodeEventSource
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