Struct choices::warp::filters::sse::KeepAlive [−][src]
pub struct KeepAlive { /* fields omitted */ }
Configure the interval between keep-alive messages, the content of each message, and the associated stream.
Implementations
impl KeepAlive
[src]
impl KeepAlive
[src]pub fn interval(self, time: Duration) -> KeepAlive
[src]
pub fn interval(self, time: Duration) -> KeepAlive
[src]Customize the interval between keep-alive messages.
Default is 15 seconds.
pub fn text(self, text: impl Into<Cow<'static, str>>) -> KeepAlive
[src]
pub fn text(self, text: impl Into<Cow<'static, str>>) -> KeepAlive
[src]Customize the text of the keep-alive message.
Default is an empty comment.
pub fn stream<S>(
self,
event_stream: S
) -> impl TryStream<Ok = Event, Error = impl Error + Send + Sync + 'static> + Send + 'static where
S: TryStream<Ok = Event> + Send + 'static,
<S as TryStream>::Error: Error,
<S as TryStream>::Error: Send,
<S as TryStream>::Error: Sync,
<S as TryStream>::Error: 'static,
[src]
pub fn stream<S>(
self,
event_stream: S
) -> impl TryStream<Ok = Event, Error = impl Error + Send + Sync + 'static> + Send + 'static where
S: TryStream<Ok = Event> + Send + 'static,
<S as TryStream>::Error: Error,
<S as TryStream>::Error: Send,
<S as TryStream>::Error: Sync,
<S as TryStream>::Error: 'static,
[src]Wrap an event stream with keep-alive functionality.
See keep_alive
for more.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for KeepAlive
impl Send for KeepAlive
impl Sync for KeepAlive
impl Unpin for KeepAlive
impl UnwindSafe for KeepAlive
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,