pub struct EndpointSource { /* private fields */ }Expand description
The origins a service is reachable at, live origin first.
Implementations§
Source§impl EndpointSource
impl EndpointSource
Sourcepub fn fixed(origins: Vec<String>) -> EndpointSource
pub fn fixed(origins: Vec<String>) -> EndpointSource
Only these origins, never a live one.
Sourcepub fn live(fallback: Vec<String>) -> (EndpointSource, EndpointPublisher)
pub fn live(fallback: Vec<String>) -> (EndpointSource, EndpointPublisher)
A source whose live origin the returned publisher sets; fallback
is served after it, and alone while there is none.
Sourcepub fn live_origin(&self) -> Option<String>
pub fn live_origin(&self) -> Option<String>
The live origin, if one is published now.
Trait Implementations§
Source§impl Clone for EndpointSource
impl Clone for EndpointSource
Source§fn clone(&self) -> EndpointSource
fn clone(&self) -> EndpointSource
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 moreAuto Trait Implementations§
impl Forget for EndpointSource
impl Freeze for EndpointSource
impl Move for EndpointSource
impl RefUnwindSafe for EndpointSourcewhere
Atomic<usize>: RefUnwindSafe,
RwLock<Option<String>>: RefUnwindSafe,
AtomicUsize: RefUnwindSafe,
Notify: RefUnwindSafe,
impl Send for EndpointSource
impl Sync for EndpointSource
impl Unpin for EndpointSource
impl UnsafeUnpin for EndpointSourcewhere
*const ArcInner<Shared<Option<String>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared<Option<String>>>>: UnsafeUnpin,
*const ArcInner<[String]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[String]>>: UnsafeUnpin,
impl UnwindSafe for EndpointSource
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<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