pub struct Or {
pub input1: bool,
pub input2: bool,
}
Expand description
或门 有true则为true 或门由三个与非门组成
§Examples
use logicgate::Or;
use logicgate::LogicGate;
let a = Or{input1: true,input2: false};
let b = Or{input1: false,input2: false};
assert_eq!(a.get_result(),true);
assert_eq!(b.get_result(),false);
Fields§
§input1: bool
§input2: bool
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Or
impl Send for Or
impl Sync for Or
impl Unpin for Or
impl UnwindSafe for Or
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