Struct jormungandr_automation::jormungandr::grpc::server::controller::MockController
source · pub struct MockController {
verifier: MockVerifier,
stop_signal: Sender<()>,
data: Arc<RwLock<MockServerData>>,
port: u16,
}
Fields§
§verifier: MockVerifier
§stop_signal: Sender<()>
§data: Arc<RwLock<MockServerData>>
§port: u16
Implementations§
source§impl MockController
impl MockController
pub fn new( logger: MockLogger, stop_signal: Sender<()>, data: Arc<RwLock<MockServerData>>, port: u16 ) -> Self
pub fn finish_and_verify_that<F>(self, verify_func: F) -> MockExitCodewhere F: Fn(&MockVerifier) -> bool + 'static + Send,
sourcepub fn set_tip(&mut self, tip: &Header)
pub fn set_tip(&mut self, tip: &Header)
block_id must refer to a valid block already in the storage
pub fn set_tip_block(&mut self, tip: &Block)
pub fn genesis_hash(&self) -> Hash
pub fn set_genesis(&mut self, tip: Hash)
pub fn set_protocol(&mut self, protocol: ProtocolVersion)
pub fn stop(self)
pub fn address(&self) -> String
Auto Trait Implementations§
impl !RefUnwindSafe for MockController
impl Send for MockController
impl !Sync for MockController
impl Unpin for MockController
impl !UnwindSafe for MockController
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§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