pub struct ChannelSettings {
pub token: Option<String>,
pub values: HashMap<String, String>,
}Expand description
Parameters a channel needs to construct itself.
Values come from [channel].settings in the config file, falling back to
APOLLO_CHANNEL_<KEY> in the environment so tokens need not be written to
disk.
Fields§
§token: Option<String>§values: HashMap<String, String>Implementations§
Source§impl ChannelSettings
impl ChannelSettings
pub fn new(token: Option<String>, values: HashMap<String, String>) -> Self
Sourcepub fn get(&self, key: &str) -> Option<String>
pub fn get(&self, key: &str) -> Option<String>
A setting, or None if neither config nor environment supplies it.
Trait Implementations§
Source§impl Clone for ChannelSettings
impl Clone for ChannelSettings
Source§fn clone(&self) -> ChannelSettings
fn clone(&self) -> ChannelSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ChannelSettings
impl Debug for ChannelSettings
Source§impl Default for ChannelSettings
impl Default for ChannelSettings
Source§fn default() -> ChannelSettings
fn default() -> ChannelSettings
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChannelSettings
impl RefUnwindSafe for ChannelSettings
impl Send for ChannelSettings
impl Sync for ChannelSettings
impl Unpin for ChannelSettings
impl UnsafeUnpin for ChannelSettings
impl UnwindSafe for ChannelSettings
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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