pub struct Work {
pub num1: Option<i32>,
pub num2: Option<i32>,
pub op: Option<Operation>,
pub comment: Option<String>,
}
Expand description
Structs are the basic complex data structures. They are comprised of fields which each have an integer identifier, a type, a symbolic name, and an optional default value.
Fields can be declared “optional”, which ensures they will not be included in the serialized output if they aren’t set. Note that this requires some manual management in some languages.
Fields§
§num1: Option<i32>
§num2: Option<i32>
§op: Option<Operation>
§comment: Option<String>
Implementations§
Source§impl Work
impl Work
pub fn new<F1, F2, F3, F4>(num1: F1, num2: F2, op: F3, comment: F4) -> Work
pub fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol) -> Result<Work>
pub fn write_to_out_protocol( &self, o_prot: &mut dyn TOutputProtocol, ) -> Result<()>
Trait Implementations§
Source§impl Ord for Work
impl Ord for Work
Source§impl PartialOrd for Work
impl PartialOrd for Work
impl Eq for Work
impl StructuralPartialEq for Work
Auto Trait Implementations§
impl Freeze for Work
impl RefUnwindSafe for Work
impl Send for Work
impl Sync for Work
impl Unpin for Work
impl UnwindSafe for Work
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