Skip to main content

Crate sockudo_http

Crate sockudo_http 

Source
Expand description

Sockudo HTTP API client for Rust

This library provides a safe, fast, and idiomatic Rust client for the Sockudo HTTP API.

§Features

  • rustls-tls (default): Use rustls for TLS (recommended for cross-compilation)
  • native-tls: Use native TLS (OpenSSL on Linux, Secure Transport on macOS, SChannel on Windows)
  • encryption (default): Enable support for end-to-end encrypted channels

§Cross-Compilation

This library is designed to work well with cross-compilation. The default features use pure-Rust dependencies that compile easily to different targets.

# Cross-compile to ARM
cross build --target armv7-unknown-linux-gnueabihf --release

Re-exports§

pub use channel::Channel;
pub use channel::ChannelName;
pub use channel::ChannelType;
pub use config::Config;
pub use config::ConfigBuilder;
pub use errors::RequestError;
pub use errors::SockudoError;
pub use errors::WebhookError;
pub use sockudo::Sockudo;
pub use token::Token;
pub use webhook::Webhook;
pub use webhook::WebhookEvent;
pub use auth::SocketAuth;
pub use auth::UserAuth;
pub use events::BatchEvent;
pub use events::Event;
pub use events::MessageExtras;
pub use events::TriggerParams;
pub use events::generate_idempotency_key;
pub use history::AnnotationEventsParams;
pub use history::AnnotationEventsResponse;
pub use history::DeleteAnnotationResponse;
pub use history::GetMessageResponse;
pub use history::HistoryBounds;
pub use history::HistoryContinuity;
pub use history::HistoryItem;
pub use history::HistoryPage;
pub use history::HistoryParams;
pub use history::ListMessageVersionsResponse;
pub use history::MessageVersionsParams;
pub use history::MutationResponse;
pub use history::PublishAnnotationRequest;
pub use history::PublishAnnotationResponse;
pub use presence_history::PresenceHistoryBounds;
pub use presence_history::PresenceHistoryContinuity;
pub use presence_history::PresenceHistoryItem;
pub use presence_history::PresenceHistoryPage;
pub use presence_history::PresenceHistoryParams;
pub use presence_history::PresenceSnapshot;
pub use presence_history::PresenceSnapshotMember;
pub use presence_history::PresenceSnapshotParams;
pub use push::PushCursorParams;
pub use push::PushSubscriptionParams;

Modules§

auth
channel
config
errors
events
history
presence_history
push
sockudo
token
util
webhook

Structs§

BuildInfo
Information about the build configuration

Constants§

ENCRYPTION_AVAILABLE
Check if encryption support is available at compile time

Type Aliases§

Result
Result type alias for Sockudo operations