pub struct Zond<T: OperationType> { /* private fields */ }Expand description
Struct that controls how and when to handle operations.
Implementations§
Source§impl<T: OperationType> Zond<T>
impl<T: OperationType> Zond<T>
Sourcepub fn new(zond_handler: impl ZondHandler<T> + 'static, policy: Policy) -> Self
pub fn new(zond_handler: impl ZondHandler<T> + 'static, policy: Policy) -> Self
Constructs a new Zond<T>
§Example
struct HandlerImpl;
impl<T: OperationType + Debug> ZondHandler<T> for HandlerImpl {
fn handle(&self, id: usize, operations: Operations<T>) {
for operation in operations {
println!("{:?}", operation.get_type());
}
}
}
fn main() {
let zond: Zond<ZVecOperation<usize>> = Zond::new(HandlerImpl, Policy::on_drop_only());
}Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Zond<T>
impl<T> !RefUnwindSafe for Zond<T>
impl<T> !Send for Zond<T>
impl<T> !Sync for Zond<T>
impl<T> Unpin for Zond<T>
impl<T> !UnwindSafe for Zond<T>
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