pub struct ClientOptions {
pub domain: String,
pub secure: bool,
}
Expand description
Options for instantiating a LemmyClient
.
Fields§
§domain: String
Domain of the instance the client will send requests to.
use lemmy_client::ClientOptions;
// ❌ You do not have to include the scheme for the domain.
let options = ClientOptions {
domain: String::from("https://lemmy.ml"),
secure: true
};
// ✅ All you need is the domain (including subdomain, if applicaple).
let options = ClientOptions {
domain: String::from("lemmy.ml"),
secure: true
};
secure: bool
If true, use HTTPS. If false, use HTTP
Trait Implementations§
Source§impl Clone for ClientOptions
impl Clone for ClientOptions
Source§fn clone(&self) -> ClientOptions
fn clone(&self) -> ClientOptions
Returns a copy 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 moreSource§impl Debug for ClientOptions
impl Debug for ClientOptions
Source§impl PartialEq for ClientOptions
impl PartialEq for ClientOptions
impl Eq for ClientOptions
impl StructuralPartialEq for ClientOptions
Auto Trait Implementations§
impl Freeze for ClientOptions
impl RefUnwindSafe for ClientOptions
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl UnwindSafe for ClientOptions
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