Skip to main content

FarmerRpcWorker

Struct FarmerRpcWorker 

Source
pub struct FarmerRpcWorker<BCI, CSS>
where BCI: BeaconChainInfo, CSS: ChainSyncStatus,
{ /* private fields */ }
Expand description

Worker that drives RPC server tasks

Implementations§

Source§

impl<BCI, CSS> FarmerRpcWorker<BCI, CSS>
where BCI: BeaconChainInfo, CSS: ChainSyncStatus,

Source

pub async fn new(config: FarmerRpcConfig<BCI, CSS>) -> Result<Self>

Creates a new farmer RPC worker

Source

pub async fn run(self)

Drive RPC server tasks

Trait Implementations§

Source§

impl<BCI, CSS> Debug for FarmerRpcWorker<BCI, CSS>
where BCI: BeaconChainInfo + Debug, CSS: ChainSyncStatus + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<BCI, CSS> !Freeze for FarmerRpcWorker<BCI, CSS>

§

impl<BCI, CSS> !RefUnwindSafe for FarmerRpcWorker<BCI, CSS>

§

impl<BCI, CSS> !UnwindSafe for FarmerRpcWorker<BCI, CSS>

§

impl<BCI, CSS> Forget for FarmerRpcWorker<BCI, CSS>

§

impl<BCI, CSS> Move for FarmerRpcWorker<BCI, CSS>

§

impl<BCI, CSS> Send for FarmerRpcWorker<BCI, CSS>
where I32NotAllOnes: Send, Atomic<usize>: Send, Registration: Send, Arc<Handle>: Send, Arc<Handle>: Send, Arc<dyn IdProvider>: Send, Arc<Yoke<BeaconChainHeader<'static>, SharedAlignedBuffer>>: Send, Arc<Yoke<BeaconChainBody<'static>, SharedAlignedBuffer>>: Send, Arc<Mutex<RawMutex, LruMap<SlotNumber, Sender<Solution>>>>: Send, Arc<Mutex<RawMutex, BlockSignatureSenders>>: Send, RawVecInner: Send, Bytes: Send, NonZero<u8>: Send, Arc<Mutex<RawMutex, Vec<SubscriptionSink>>>: Send, Arc<Mutex<Option<CachedArchivedSegment>>>: Send, Arc<Mutex<RawMutex, CachedSuperSegments>>: Send, Arc<Mutex<RawMutex, ShardMembershipConnections>>: Send, Arc<BoundedInner<Vec<FarmerShardMembershipInfo>>>: Send, Arc<Mutex<SenderTask>>: Send, Arc<BoundedInner<NewSlotNotification>>: Send, Arc<BoundedInner<BlockSealNotification>>: Send, Arc<BoundedInner<SuperSegment>>: Send,

§

impl<BCI, CSS> Sync for FarmerRpcWorker<BCI, CSS>
where I32NotAllOnes: Sync, Atomic<usize>: Sync, Registration: Sync, Arc<Handle>: Sync, Arc<Handle>: Sync, Arc<dyn IdProvider>: Sync, Arc<Yoke<BeaconChainHeader<'static>, SharedAlignedBuffer>>: Sync, Arc<Yoke<BeaconChainBody<'static>, SharedAlignedBuffer>>: Sync, Arc<Mutex<RawMutex, LruMap<SlotNumber, Sender<Solution>>>>: Sync, Arc<Mutex<RawMutex, BlockSignatureSenders>>: Sync, RawVecInner: Sync, Bytes: Sync, NonZero<u8>: Sync, Arc<Mutex<RawMutex, Vec<SubscriptionSink>>>: Sync, Arc<Mutex<Option<CachedArchivedSegment>>>: Sync, Arc<Mutex<RawMutex, CachedSuperSegments>>: Sync, Arc<Mutex<RawMutex, ShardMembershipConnections>>: Sync, Arc<BoundedInner<Vec<FarmerShardMembershipInfo>>>: Sync, Arc<Mutex<SenderTask>>: Sync, Arc<BoundedInner<NewSlotNotification>>: Sync, Arc<BoundedInner<BlockSealNotification>>: Sync, Arc<BoundedInner<SuperSegment>>: Sync,

§

impl<BCI, CSS> Unpin for FarmerRpcWorker<BCI, CSS>
where CSS: Unpin, BCI: Unpin, I32NotAllOnes: Unpin, Align8<usize>: Unpin, Arc<Handle>: Unpin, Arc<Handle>: Unpin, Arc<ScheduledIo>: Unpin, Arc<dyn IdProvider>: Unpin, *const ArcInner<Yoke<BeaconChainHeader<'static>, SharedAlignedBuffer>> is !null: Unpin, &'static BlockHeaderPrefix: Unpin, &'static BlockHeaderResult: Unpin, &'static BlockHeaderConsensusInfo: Unpin, &'static BlockHeaderEd25519Seal: Unpin, &'static Blake3Hash: Unpin, NonZero<u32>: Unpin, NonZero<u16>: Unpin, &'static SuperSegmentRoot: Unpin, &'static BlockHeaderPotParametersChange: Unpin, &'static [u8]: Unpin, Align4<u32>: Unpin, *const u8 is !null: Unpin, *const ArcInner<Yoke<BeaconChainBody<'static>, SharedAlignedBuffer>> is !null: Unpin, &'static [SegmentRoot]: Unpin, &'static [PotCheckpoints]: Unpin, *const ArcInner<Mutex<RawMutex, LruMap<SlotNumber, Sender<Solution>>>> is !null: Unpin, Align1<u8>: Unpin, BoundedSenderInner<Solution>: Unpin, u32: Unpin, *const ArcInner<Mutex<RawMutex, BlockSignatureSenders>> is !null: Unpin, Sender<OwnedBlockHeaderSeal>: Unpin, *const u8: Unpin, Align8<*mut ()>: Unpin, &'static Vtable: Unpin, NonZero<u8>: Unpin, *const ArcInner<Mutex<RawMutex, Vec<SubscriptionSink>>> is !null: Unpin, Arc<Chan<Box<RawValue>, Semaphore>>: Unpin, &'static str: Unpin, Arc<Mutex<RawMutex, HashMap<SubscriptionKey, (MethodSink, Receiver<()>), FxBuildHasher>>>: Unpin, String: Unpin, Arc<Chan<(), Semaphore>>: Unpin, Arc<OwnedSemaphorePermit>: Unpin, *const ArcInner<Mutex<Option<CachedArchivedSegment>>> is !null: Unpin, Align8<*mut Inner<()>>: Unpin, *const ArcInner<Mutex<RawMutex, CachedSuperSegments>> is !null: Unpin, Arc<[ShardSegmentRootWithPosition]>: Unpin, *const ArcInner<Mutex<RawMutex, ShardMembershipConnections>> is !null: Unpin, BoundedSenderInner<Vec<FarmerShardMembershipInfo>>: Unpin, Receiver<NewSlotNotification>: Unpin, Receiver<BlockSealNotification>: Unpin, Receiver<SuperSegment>: Unpin,

§

impl<BCI, CSS> UnsafeUnpin for FarmerRpcWorker<BCI, CSS>
where I32NotAllOnes: UnsafeUnpin, Align8<usize>: UnsafeUnpin, *const ArcInner<Handle> is !null: UnsafeUnpin, PhantomData<ArcInner<Handle>>: UnsafeUnpin, *const ArcInner<Handle> is !null: UnsafeUnpin, PhantomData<ArcInner<Handle>>: UnsafeUnpin, *const ArcInner<ScheduledIo> is !null: UnsafeUnpin, PhantomData<ArcInner<ScheduledIo>>: UnsafeUnpin, *const ArcInner<dyn IdProvider> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn IdProvider>>: UnsafeUnpin, *const ArcInner<Yoke<BeaconChainHeader<'static>, SharedAlignedBuffer>> is !null: UnsafeUnpin, PhantomData<Yoke<BeaconChainHeader<'static>, SharedAlignedBuffer>>: UnsafeUnpin, *const ArcInner<Yoke<BeaconChainBody<'static>, SharedAlignedBuffer>> is !null: UnsafeUnpin, PhantomData<Yoke<BeaconChainBody<'static>, SharedAlignedBuffer>>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, LruMap<SlotNumber, Sender<Solution>>>> is !null: UnsafeUnpin, PhantomData<Mutex<RawMutex, LruMap<SlotNumber, Sender<Solution>>>>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, BlockSignatureSenders>> is !null: UnsafeUnpin, PhantomData<Mutex<RawMutex, BlockSignatureSenders>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<Multiaddr>: UnsafeUnpin, BCI: UnsafeUnpin, CSS: UnsafeUnpin, NonZeroU8Inner: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, Vec<SubscriptionSink>>> is !null: UnsafeUnpin, PhantomData<Mutex<RawMutex, Vec<SubscriptionSink>>>: UnsafeUnpin, *const ArcInner<Mutex<Option<CachedArchivedSegment>>> is !null: UnsafeUnpin, PhantomData<Mutex<Option<CachedArchivedSegment>>>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, CachedSuperSegments>> is !null: UnsafeUnpin, PhantomData<Mutex<RawMutex, CachedSuperSegments>>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, ShardMembershipConnections>> is !null: UnsafeUnpin, PhantomData<Mutex<RawMutex, ShardMembershipConnections>>: UnsafeUnpin, *const ArcInner<BoundedInner<Vec<FarmerShardMembershipInfo>>> is !null: UnsafeUnpin, PhantomData<ArcInner<BoundedInner<Vec<FarmerShardMembershipInfo>>>>: UnsafeUnpin, *const ArcInner<Mutex<SenderTask>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<SenderTask>>>: UnsafeUnpin, *const ArcInner<BoundedInner<NewSlotNotification>> is !null: UnsafeUnpin, PhantomData<ArcInner<BoundedInner<NewSlotNotification>>>: UnsafeUnpin, *const ArcInner<BoundedInner<BlockSealNotification>> is !null: UnsafeUnpin, PhantomData<ArcInner<BoundedInner<BlockSealNotification>>>: UnsafeUnpin, *const ArcInner<BoundedInner<SuperSegment>> is !null: UnsafeUnpin, PhantomData<ArcInner<BoundedInner<SuperSegment>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more