pub struct WebhookClient;Implementations§
Source§impl WebhookClient
impl WebhookClient
Sourcepub fn start(port: u16, auth: String) -> UnboundedReceiver<Webhook>
pub fn start(port: u16, auth: String) -> UnboundedReceiver<Webhook>
Starts listening to a port and filtering requests with a authentication string.
§Examples
use futures::StreamExt;
#[tokio::main]
async fn main() {
let mut events = topgg::WebhookClient::start(3030, "a-very-secret-password".to_string());
while let Some(msg) = events.next().await {
println!("{:?}", msg)
}
}Auto Trait Implementations§
impl Freeze for WebhookClient
impl RefUnwindSafe for WebhookClient
impl Send for WebhookClient
impl Sync for WebhookClient
impl Unpin for WebhookClient
impl UnsafeUnpin for WebhookClient
impl UnwindSafe for WebhookClient
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