pub struct Query {
pub kinds: Vec<u16>,
pub z_tags: Vec<String>,
pub d_tags: Vec<String>,
pub authors: Vec<String>,
pub since: Option<u64>,
pub until: Option<u64>,
pub limit: Option<usize>,
}Expand description
The slice of a relay query the Community protocol needs: event kinds, the z
pseudonym tag values, and an optional since floor. Production translates
this into a Nostr Filter; the in-memory relay matches it directly.
Fields§
§kinds: Vec<u16>z tag values to match (OR). Empty = match any (no z constraint).
d tag (identifier) values to match (OR). Empty = no d constraint. Used to
locate addressable events (e.g. a public-invite bundle by its token locator).
Author pubkeys (hex) to match (OR). Empty = any author.
since: Option<u64>Lower bound on created_at (seconds), inclusive.
until: Option<u64>Upper bound on created_at (seconds), inclusive — pages OLDER history (events
strictly/inclusively before a scroll cursor).
limit: Option<usize>Max events to return (newest-first), the relay-side page cap. None = no limit.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
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