#[repr(C)]pub struct pm_rational_node {
pub base: pm_node_t,
pub numerator: pm_integer_t,
pub denominator: pm_integer_t,
}
Expand description
RationalNode
Represents a rational number literal.
1.0r
^^^^
Type: ::PM_RATIONAL_NODE
Flags (#pm_integer_base_flags):
- ::PM_INTEGER_BASE_FLAGS_BINARY
- ::PM_INTEGER_BASE_FLAGS_DECIMAL
- ::PM_INTEGER_BASE_FLAGS_OCTAL
- ::PM_INTEGER_BASE_FLAGS_HEXADECIMAL
@extends pm_node_t
Fields§
§base: pm_node_t
The embedded base node.
numerator: pm_integer_t
RationalNode#numerator
The numerator of the rational number.
1.5r # numerator 3
denominator: pm_integer_t
RationalNode#denominator
The denominator of the rational number.
1.5r # denominator 2
Trait Implementations§
Source§impl Clone for pm_rational_node
impl Clone for pm_rational_node
Source§fn clone(&self) -> pm_rational_node
fn clone(&self) -> pm_rational_node
Returns a copy 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 Debug for pm_rational_node
impl Debug for pm_rational_node
Source§impl Default for pm_rational_node
impl Default for pm_rational_node
impl Copy for pm_rational_node
Auto Trait Implementations§
impl Freeze for pm_rational_node
impl RefUnwindSafe for pm_rational_node
impl !Send for pm_rational_node
impl !Sync for pm_rational_node
impl Unpin for pm_rational_node
impl UnwindSafe for pm_rational_node
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