pub struct JobContext {
pub config: Config,
pub source: ConnectionInfo,
pub target: ConnectionInfo,
pub metrics: Arc<Metrics>,
pub cancel: CancellationToken,
pub progress: ProgressHandle,
pub source_version: Arc<Mutex<Option<String>>>,
}Expand description
Everything a command needs.
Fields§
§config: Config§source: ConnectionInfo§target: ConnectionInfo§metrics: Arc<Metrics>§cancel: CancellationToken§progress: ProgressHandle§source_version: Arc<Mutex<Option<String>>>Source version() once known (preflight or stream open), for the heartbeat row.
Implementations§
Source§impl JobContext
impl JobContext
pub fn new(config: Config, cancel: CancellationToken) -> Result<Self>
pub fn stream_factory(&self) -> PgStreamFactory
Auto Trait Implementations§
impl !RefUnwindSafe for JobContext
impl !UnwindSafe for JobContext
impl Freeze for JobContext
impl Send for JobContext
impl Sync for JobContext
impl Unpin for JobContext
impl UnsafeUnpin for JobContext
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