Struct lemmy_client::ClientOptions
source · pub struct ClientOptions {
pub domain: String,
pub secure: bool,
}Expand description
Options for instantiating a LemmyClient.
Fields§
§domain: StringDomain 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: boolIf 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
source§fn eq(&self, other: &ClientOptions) -> bool
fn eq(&self, other: &ClientOptions) -> bool
This method tests for
self and other values to be equal, and is used
by ==.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)