pub struct Provider {
pub address: String,
pub model: String,
pub key_file: String,
pub key_header: String,
}Expand description
The provider as the settings describe it. Every field is what the person wrote, trimmed.
Fields§
§address: StringThe address the Messages API lives under.
model: StringThe model asked for.
key_file: StringThe path of the key file, as written: ~/ stands for the home folder.
key_header: StringThe header the key goes in.
Implementations§
Source§impl Provider
impl Provider
Sourcepub fn from_settings(settings: &Settings) -> Self
pub fn from_settings(settings: &Settings) -> Self
The provider in settings.
Sourcepub fn write(&self, settings: &mut Settings)
pub fn write(&self, settings: &mut Settings)
Writes the provider into settings. A header that is the default is not written, the
way the ecosystem writes no default.
Sourcepub fn missing_field(&self) -> Option<&'static str>
pub fn missing_field(&self) -> Option<&'static str>
The first empty field, if any: the provider cannot be asked without all of them.
Trait Implementations§
impl Eq for Provider
impl StructuralPartialEq for Provider
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnsafeUnpin for Provider
impl UnwindSafe for Provider
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more