pub struct CallbackStorage<T: Clone + Send> {
pub callback: fn(&T, FnOptions) -> Result<(), Box<dyn Error>>,
pub user_data: T,
}
Fields§
§callback: fn(&T, FnOptions) -> Result<(), Box<dyn Error>>
§user_data: T
Implementations§
Trait Implementations§
Source§impl<T: Clone + Send + 'static> ChipInterface for CallbackStorage<T>
impl<T: Clone + Send + 'static> ChipInterface for CallbackStorage<T>
Source§fn get_device_info(&self) -> Result<Option<DeviceInfo>, Box<dyn Error>>
fn get_device_info(&self) -> Result<Option<DeviceInfo>, Box<dyn Error>>
Access information about the underlying chip.
Source§fn axi_read(&self, addr: u32, data: &mut [u8]) -> Result<(), Box<dyn Error>>
fn axi_read(&self, addr: u32, data: &mut [u8]) -> Result<(), Box<dyn Error>>
Read and write to the noc endpoint on the chip in implementation
this may take the form of a direct pci bar read/write or a noc read/write
fn axi_write(&self, addr: u32, data: &[u8]) -> Result<(), Box<dyn Error>>
Source§fn noc_read(
&self,
noc_id: u8,
x: u8,
y: u8,
addr: u64,
data: &mut [u8],
) -> Result<(), Box<dyn Error>>
fn noc_read( &self, noc_id: u8, x: u8, y: u8, addr: u64, data: &mut [u8], ) -> Result<(), Box<dyn Error>>
Read and write to a noc endpoint on the chip.
fn noc_write( &self, noc_id: u8, x: u8, y: u8, addr: u64, data: &[u8], ) -> Result<(), Box<dyn Error>>
fn noc_broadcast( &self, noc_id: u8, addr: u64, data: &[u8], ) -> Result<(), Box<dyn Error>>
Source§fn eth_noc_read(
&self,
eth_addr: EthAddr,
noc_id: u8,
x: u8,
y: u8,
addr: u64,
data: &mut [u8],
) -> Result<(), Box<dyn Error>>
fn eth_noc_read( &self, eth_addr: EthAddr, noc_id: u8, x: u8, y: u8, addr: u64, data: &mut [u8], ) -> Result<(), Box<dyn Error>>
Read and write to a noc endpoint via ethernet on a local or remote chip.
fn eth_noc_write( &self, eth_addr: EthAddr, noc_id: u8, x: u8, y: u8, addr: u64, data: &[u8], ) -> Result<(), Box<dyn Error>>
fn eth_noc_broadcast( &self, eth_addr: EthAddr, noc_id: u8, addr: u64, data: &[u8], ) -> Result<(), Box<dyn Error>>
fn as_any(&self) -> &dyn Any
Auto Trait Implementations§
impl<T> Freeze for CallbackStorage<T>where
T: Freeze,
impl<T> RefUnwindSafe for CallbackStorage<T>where
T: RefUnwindSafe,
impl<T> Send for CallbackStorage<T>
impl<T> Sync for CallbackStorage<T>where
T: Sync,
impl<T> Unpin for CallbackStorage<T>where
T: Unpin,
impl<T> UnwindSafe for CallbackStorage<T>where
T: 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