pub struct ConnectionOptions {
pub address: String,
pub project_id: ProjectId,
pub auth: Authorization,
pub origin: Option<String>,
pub user_agent: Option<UserAgent>,
}Expand description
Relay connection options.
Fields§
§address: StringThe Relay websocket address. The default address is
wss://relay.walletconnect.com.
project_id: ProjectIdThe project-specific secret key. Can be generated in the Cloud Dashboard at the following URL: https://cloud.walletconnect.com/app
auth: AuthorizationThe authorization method and auth token to use.
origin: Option<String>Optional origin of the request. Subject to allow-list validation.
user_agent: Option<UserAgent>Optional user agent parameters.
Implementations§
Source§impl ConnectionOptions
impl ConnectionOptions
pub fn new(project_id: impl Into<ProjectId>, auth: SerializedAuthToken) -> Self
pub fn with_address(self, address: impl Into<String>) -> Self
pub fn with_origin(self, origin: impl Into<Option<String>>) -> Self
pub fn with_user_agent(self, user_agent: impl Into<Option<UserAgent>>) -> Self
pub fn as_url(&self) -> Result<Url, RequestBuildError>
Trait Implementations§
Source§impl Clone for ConnectionOptions
impl Clone for ConnectionOptions
Source§fn clone(&self) -> ConnectionOptions
fn clone(&self) -> ConnectionOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ConnectionOptions
impl RefUnwindSafe for ConnectionOptions
impl Send for ConnectionOptions
impl Sync for ConnectionOptions
impl Unpin for ConnectionOptions
impl UnwindSafe for ConnectionOptions
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