[−][src]Struct spacejam::Revolver
Cowboy + Revolver ~> Spaceboy
Fields
pool: TransactionArray
chain: BarrelChain
Methods
impl Revolver
[src]
pub fn locate(p: &'static str, c: &'static str, cb: &'static str) -> Self
[src]
locate database
Example
fn revolver() { let revolver = Revolver::locate("test_pool", "test_chain", "test_cowboy"); assert_eq!(revolver.pool.len(), 0); assert_eq!(revolver.pool.to_bytes().len(), 8); assert_eq!(revolver.pool, TransactionArray::default()); assert_eq!(revolver.chain.len(), 1); assert_eq!(revolver.chain.to_bytes().len(), 239); assert_eq!(revolver.master().to_bytes().len(), 72); revolver.explode(); }
pub fn master(&self) -> Cowboy
[src]
find the master cowboy
pub fn shoot(&mut self, tx: Transaction)
[src]
shoot transaction
pub fn revolve(&mut self, bc: Barrel)
[src]
refresh chain records.
pub fn explode(&self)
[src]
clean database
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self