Struct TradeTick
pub struct TradeTick { /* private fields */ }Expand description
A trade tick wrapper.
Implementations§
§impl TradeTick
impl TradeTick
pub const fn new(price: MarketPrice) -> TradeTick
pub const fn new(price: MarketPrice) -> TradeTick
Creates a trade tick.
pub fn with_timestamp(
self,
timestamp: impl AsRef<str>,
) -> Result<TradeTick, TickError>
pub fn with_timestamp( self, timestamp: impl AsRef<str>, ) -> Result<TradeTick, TickError>
Attaches a timestamp label.
§Errors
Returns [TickError::EmptyTimestamp] when the trimmed label is empty.
Trait Implementations§
impl StructuralPartialEq for TradeTick
Auto Trait Implementations§
impl Freeze for TradeTick
impl RefUnwindSafe for TradeTick
impl Send for TradeTick
impl Sync for TradeTick
impl Unpin for TradeTick
impl UnsafeUnpin for TradeTick
impl UnwindSafe for TradeTick
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