pub struct ChainFilter<H = HoloHash<Action>>{
pub chain_top: H,
pub limit_conditions: LimitConditions<H>,
pub include_cached_entries: bool,
}Expand description
Filter the contiguous chain of actions from an agent’s source chain.
Starting from a specified chain_top ActionHash, the filter walks backwards through
the linear chain path, towards genesis, excluding any forked actions, and bounded by
the specified LimitConditions.
Fields§
§chain_top: HThe starting position of the filter.
limit_conditions: LimitConditions<H>The limit conditions used by this filter.
Defaults to LimitConditions::ToGenesis.
include_cached_entries: boolShould the query return any entries that are cached at the agent activity to save network hops.
Implementations§
Source§impl<H> ChainFilter<H>
impl<H> ChainFilter<H>
Sourcepub fn new(chain_top: H) -> ChainFilter<H>
pub fn new(chain_top: H) -> ChainFilter<H>
Create a new filter using this ActionHash as
the starting position and walking the chain
towards the genesis Action.
Sourcepub fn take(chain_top: H, n: u32) -> ChainFilter<H>
pub fn take(chain_top: H, n: u32) -> ChainFilter<H>
Create a filter with a take limit.
Sourcepub fn include_cached_entries(self) -> ChainFilter<H>
pub fn include_cached_entries(self) -> ChainFilter<H>
Set this filter to include any cached entries at the agent activity authority.
Sourcepub fn until_timestamp(chain_top: H, timestamp: Timestamp) -> ChainFilter<H>
pub fn until_timestamp(chain_top: H, timestamp: Timestamp) -> ChainFilter<H>
Create a filter with an until-timestamp limit.
Sourcepub fn until_hash(chain_top: H, action_hash: H) -> ChainFilter<H>
pub fn until_hash(chain_top: H, action_hash: H) -> ChainFilter<H>
Create a filter with an until-hash limit.
Sourcepub fn get_until_hash(&self) -> Option<&H>
pub fn get_until_hash(&self) -> Option<&H>
Get the until hash if there is one.
Sourcepub fn get_until_timestamp(&self) -> Option<Timestamp>
pub fn get_until_timestamp(&self) -> Option<Timestamp>
Get the take number if there is one.
Trait Implementations§
Source§impl<H> Clone for ChainFilter<H>
impl<H> Clone for ChainFilter<H>
Source§fn clone(&self) -> ChainFilter<H>
fn clone(&self) -> ChainFilter<H>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<H> Debug for ChainFilter<H>
impl<H> Debug for ChainFilter<H>
Source§impl<'de, H> Deserialize<'de> for ChainFilter<H>
impl<'de, H> Deserialize<'de> for ChainFilter<H>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChainFilter<H>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChainFilter<H>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl<H> Eq for ChainFilter<H>
Source§impl<H> Hash for ChainFilter<H>
impl<H> Hash for ChainFilter<H>
Source§impl<H> PartialEq for ChainFilter<H>
impl<H> PartialEq for ChainFilter<H>
Source§impl<H> Serialize for ChainFilter<H>
impl<H> Serialize for ChainFilter<H>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl<H> StructuralPartialEq for ChainFilter<H>
Source§impl TryFrom<&ChainFilter> for SerializedBytes
impl TryFrom<&ChainFilter> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(t: &ChainFilter) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &ChainFilter) -> Result<SerializedBytes, SerializedBytesError>
Source§impl TryFrom<ChainFilter> for SerializedBytes
impl TryFrom<ChainFilter> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(t: ChainFilter) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: ChainFilter) -> Result<SerializedBytes, SerializedBytesError>
Source§impl TryFrom<SerializedBytes> for ChainFilter
impl TryFrom<SerializedBytes> for ChainFilter
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(sb: SerializedBytes) -> Result<ChainFilter, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<ChainFilter, SerializedBytesError>
Auto Trait Implementations§
impl<H> Freeze for ChainFilter<H>where
H: Freeze,
impl<H> RefUnwindSafe for ChainFilter<H>where
H: RefUnwindSafe,
impl<H> Send for ChainFilter<H>where
H: Send,
impl<H> Sync for ChainFilter<H>where
H: Sync,
impl<H> Unpin for ChainFilter<H>where
H: Unpin,
impl<H> UnsafeUnpin for ChainFilter<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for ChainFilter<H>where
H: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.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
key and return true if they are equal.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§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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>
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>
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.