pub struct Relay { /* private fields */ }Expand description
Relay service client — Webhooks-as-a-Service.
Delivers JSON events to HTTP endpoints that have subscribed through the Verne dashboard or the Relay API.
Obtain a Relay instance either as part of the unified Verne client or
standalone:
// Standalone
use nautilus_rs::Relay;
let relay = Relay::new("vrn_relay_live_sk_…");
// Via unified client
use nautilus_rs::Verne;
let verne = Verne::builder().relay("vrn_relay_live_sk_…").build()?;
let relay = verne.relay()?;Implementations§
Source§impl Relay
impl Relay
Sourcepub fn new(api_key: impl Into<String>) -> Self
pub fn new(api_key: impl Into<String>) -> Self
Create a Relay client with default settings.
Panics if the API key is empty or the HTTP client cannot be
initialised. Use Relay::builder for fallible construction.
Sourcepub fn builder() -> RelayBuilder
pub fn builder() -> RelayBuilder
Return a RelayBuilder for fine-grained configuration.
Sourcepub fn messages(&self) -> MessagesClient
pub fn messages(&self) -> MessagesClient
Return a MessagesClient for sending and listing webhook messages.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Relay
impl !UnwindSafe for Relay
impl Freeze for Relay
impl Send for Relay
impl Sync for Relay
impl Unpin for Relay
impl UnsafeUnpin for Relay
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