pub struct NullDriver;Expand description
A driver that records nothing: the board without a repository behind it.
Used by the unit suites and by a server serving a checkout whose tool cannot be found. It
says so in every episode’s repository field rather than leaving it blank, because an
episode that quietly recorded nothing is indistinguishable, to a reader, from one that
recorded everything.
use majordomus_cli::episodes::{EpisodeBoard, NullDriver};
use majordomus_cli::peers::{PeerBoard, Transport};
let board = EpisodeBoard::with_driver(Box::new(NullDriver));
let peer = PeerBoard::new().attach(Transport::Stdio);
let (episode, _) = board.attach(&peer, "t1", "generic");
assert_eq!(episode.repository, "no repository episode: this board is running without a driver");Trait Implementations§
Source§impl Clone for NullDriver
impl Clone for NullDriver
Source§fn clone(&self) -> NullDriver
fn clone(&self) -> NullDriver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NullDriver
impl Debug for NullDriver
Source§impl Default for NullDriver
impl Default for NullDriver
Source§fn default() -> NullDriver
fn default() -> NullDriver
Returns the “default value” for a type. Read more
Source§impl EpisodeDriver for NullDriver
impl EpisodeDriver for NullDriver
Source§fn open(&self, _: &str, _: &str) -> String
fn open(&self, _: &str, _: &str) -> String
Open the episode for
external_id under provider. Returns what to record in
ConnectionEpisode::repository — a description of what happened, successful or not.
It is called once per episode, on the first attach; a resume does not call it again. Read moreAuto Trait Implementations§
impl Freeze for NullDriver
impl RefUnwindSafe for NullDriver
impl Send for NullDriver
impl Sync for NullDriver
impl Unpin for NullDriver
impl UnsafeUnpin for NullDriver
impl UnwindSafe for NullDriver
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