pub struct NodeClient { /* private fields */ }Expand description
Client of N2C Ouroboros
Implementations§
Source§impl NodeClient
impl NodeClient
Sourcepub fn new(bearer: Bearer) -> Self
pub fn new(bearer: Bearer) -> Self
Build a client over an already-opened bearer (does not perform the handshake).
Sourcepub async fn connect(path: impl AsRef<Path>, magic: u64) -> Result<Self, Error>
pub async fn connect(path: impl AsRef<Path>, magic: u64) -> Result<Self, Error>
Connect to a Unix-domain node socket at path and perform the N2C handshake.
Sourcepub async fn handshake_query(
bearer: Bearer,
magic: u64,
) -> Result<VersionTable, Error>
pub async fn handshake_query( bearer: Bearer, magic: u64, ) -> Result<VersionTable, Error>
Issue a query-mode handshake over bearer and return the node’s
advertised version table.
Sourcepub fn chainsync(&mut self) -> &mut N2CClient
pub fn chainsync(&mut self) -> &mut N2CClient
Get mutable access to the chain-sync client (N2C).
Sourcepub fn statequery(&mut self) -> &mut Client
pub fn statequery(&mut self) -> &mut Client
Get mutable access to the local-state-query client.
Sourcepub fn submission(&mut self) -> &mut Client
pub fn submission(&mut self) -> &mut Client
Get mutable access to the local-tx-submission client.
Auto Trait Implementations§
impl Freeze for NodeClient
impl RefUnwindSafe for NodeClient
impl Send for NodeClient
impl Sync for NodeClient
impl Unpin for NodeClient
impl UnsafeUnpin for NodeClient
impl UnwindSafe for NodeClient
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> 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