pub struct Duration<'a> {
pub _tab: Table<'a>,
}Expand description
An absolute length of time unrelated to any calendar artifacts.
For the purposes of Arrow Implementations, adding this value to a Timestamp (“t1”) naively (i.e. simply summing the two numbers) is acceptable even though in some cases the resulting Timestamp (t2) would not account for leap-seconds during the elapsed time between “t1” and “t2”. Similarly, representing the difference between two Unix timestamps is acceptable, but would yield a value that is possibly a few seconds off from the true elapsed time.
The resolution defaults to millisecond, but can be any of the other supported TimeUnit values as with Timestamp and Time types. This type is always represented as an 8-byte integer.
Fields§
§_tab: Table<'a>Implementations§
Source§impl<'a> Duration<'a>
impl<'a> Duration<'a>
pub const VT_UNIT: VOffsetT = 4
pub unsafe fn init_from_table(table: Table<'a>) -> Self
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: Allocator + 'bldr>( _fbb: &'mut_bldr mut FlatBufferBuilder<'bldr, A>, args: &'args DurationArgs, ) -> WIPOffset<Duration<'bldr>>
pub fn unit(&self) -> TimeUnit
Trait Implementations§
impl<'a> Copy for Duration<'a>
impl<'a> StructuralPartialEq for Duration<'a>
Auto Trait Implementations§
impl<'a> Freeze for Duration<'a>
impl<'a> RefUnwindSafe for Duration<'a>
impl<'a> Send for Duration<'a>
impl<'a> Sync for Duration<'a>
impl<'a> Unpin for Duration<'a>
impl<'a> UnsafeUnpin for Duration<'a>
impl<'a> UnwindSafe for Duration<'a>
Blanket Implementations§
impl<T> Allocation for T
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