pub struct StreamLease {
pub id: u64,
pub lease_handle: String,
pub snapshot_lsn: u64,
pub opened_at_ms: u64,
pub config: StreamConfig,
}Fields§
§id: u64§lease_handle: StringIssue #767 / S8 — opaque handle handed to the client. 32-char
hex (128 bits of CSPRNG output). The internal id is not
derivable from this value.
snapshot_lsn: u64§opened_at_ms: u64§config: StreamConfigImplementations§
Source§impl StreamLease
impl StreamLease
Sourcepub fn snapshot_expired(&self, now_ms: u64) -> bool
pub fn snapshot_expired(&self, now_ms: u64) -> bool
true once snapshot_ttl_ms has elapsed since the lease was opened.
The shim slice materialises the result first, so expiry in practice
only fires for streams that take longer than ttl_ms to drain to
the client. The check is wired in so the wire envelope can carry
snapshot_expired exactly the way later slices (pull-based
executors) will need it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamLease
impl RefUnwindSafe for StreamLease
impl Send for StreamLease
impl Sync for StreamLease
impl Unpin for StreamLease
impl UnsafeUnpin for StreamLease
impl UnwindSafe for StreamLease
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request