pub struct OracleReader<C> { /* private fields */ }Expand description
An OracleReader is a high-level interface to the preimage oracle channel.
Implementations§
Source§impl<C> OracleReader<C>where
C: Channel,
impl<C> OracleReader<C>where
C: Channel,
Sourcepub const fn new(channel: C) -> Self
pub const fn new(channel: C) -> Self
Create a new OracleReader from a Channel.
Trait Implementations§
Source§impl<C: Clone> Clone for OracleReader<C>
impl<C: Clone> Clone for OracleReader<C>
Source§fn clone(&self) -> OracleReader<C>
fn clone(&self) -> OracleReader<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Debug> Debug for OracleReader<C>
impl<C: Debug> Debug for OracleReader<C>
Source§impl<C> PreimageOracleClient for OracleReader<C>
impl<C> PreimageOracleClient for OracleReader<C>
Source§fn get<'life0, 'async_trait>(
&'life0 self,
key: PreimageKey,
) -> Pin<Box<dyn Future<Output = PreimageOracleResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
key: PreimageKey,
) -> Pin<Box<dyn Future<Output = PreimageOracleResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the data corresponding to the currently set key from the host. Return the data in a new
heap allocated Vec<u8>
Source§fn get_exact<'life0, 'life1, 'async_trait>(
&'life0 self,
key: PreimageKey,
buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = PreimageOracleResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_exact<'life0, 'life1, 'async_trait>(
&'life0 self,
key: PreimageKey,
buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = PreimageOracleResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the data corresponding to the currently set key from the host. Write the data into the provided buffer
impl<C: Copy> Copy for OracleReader<C>
Auto Trait Implementations§
impl<C> Freeze for OracleReader<C>where
C: Freeze,
impl<C> RefUnwindSafe for OracleReader<C>where
C: RefUnwindSafe,
impl<C> Send for OracleReader<C>where
C: Send,
impl<C> Sync for OracleReader<C>where
C: Sync,
impl<C> Unpin for OracleReader<C>where
C: Unpin,
impl<C> UnwindSafe for OracleReader<C>where
C: UnwindSafe,
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