pub struct UpstreamTarget { /* private fields */ }Expand description
One upstream backend endpoint participating in a GatewayRoute.
Implementations§
Source§impl UpstreamTarget
Inherent implementation of UpstreamTarget.
impl UpstreamTarget
Inherent implementation of UpstreamTarget.
Sourcepub fn new<U>(url: U) -> Self
pub fn new<U>(url: U) -> Self
Creates an UpstreamTarget with default load-balancing weight 1.
§Arguments
U- Upstream base URL convertible intoString.
§Returns
Self- Upstream target with weight1.
Sourcepub fn with_weight(self, weight: u32) -> Self
pub fn with_weight(self, weight: u32) -> Self
Source§impl UpstreamTarget
impl UpstreamTarget
pub fn get_url(&self) -> &String
pub fn get_mut_url(&mut self) -> &mut String
pub fn set_url(&mut self, val: String) -> &mut Self
pub fn get_weight(&self) -> u32
pub fn get_mut_weight(&mut self) -> &mut u32
pub fn set_weight(&mut self, val: u32) -> &mut Self
Trait Implementations§
Source§impl Clone for UpstreamTarget
impl Clone for UpstreamTarget
Source§impl Debug for UpstreamTarget
impl Debug for UpstreamTarget
impl Eq for UpstreamTarget
Source§impl PartialEq for UpstreamTarget
impl PartialEq for UpstreamTarget
impl StructuralPartialEq for UpstreamTarget
Auto Trait Implementations§
impl Forget for UpstreamTarget
impl Freeze for UpstreamTarget
impl Move for UpstreamTarget
impl RefUnwindSafe for UpstreamTarget
impl Send for UpstreamTargetwhere
RawVecInner: Send,
impl Sync for UpstreamTargetwhere
RawVecInner: Sync,
impl Unpin for UpstreamTarget
impl UnsafeUnpin for UpstreamTarget
impl UnwindSafe for UpstreamTargetwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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§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.