#[non_exhaustive]pub struct FixOwnedSequenceSnapshot { /* private fields */ }Expand description
Owned persistable sequence-state snapshot loaded from storage.
Implementations§
Source§impl FixOwnedSequenceSnapshot
impl FixOwnedSequenceSnapshot
Sourcepub fn new(
session_id: FixOwnedSessionId,
next_inbound: u64,
next_outbound: u64,
trading_day: impl Into<Vec<u8>>,
) -> Result<Self, FixEncodeError>
pub fn new( session_id: FixOwnedSessionId, next_inbound: u64, next_outbound: u64, trading_day: impl Into<Vec<u8>>, ) -> Result<Self, FixEncodeError>
Sourcepub fn from_borrowed(snapshot: &FixSequenceSnapshot<'_>) -> Self
pub fn from_borrowed(snapshot: &FixSequenceSnapshot<'_>) -> Self
Creates an owned snapshot from a borrowed sequence snapshot.
Sourcepub fn as_borrowed(&self) -> Result<FixSequenceSnapshot<'_>, FixEncodeError>
pub fn as_borrowed(&self) -> Result<FixSequenceSnapshot<'_>, FixEncodeError>
Returns a borrowed snapshot view.
§Errors
Returns FixEncodeError if stored identity or trading-day bytes are invalid.
Sourcepub const fn session_id(&self) -> &FixOwnedSessionId
pub const fn session_id(&self) -> &FixOwnedSessionId
Returns the owned session id.
Sourcepub const fn next_inbound(&self) -> u64
pub const fn next_inbound(&self) -> u64
Returns the next inbound sequence number.
Sourcepub const fn next_outbound(&self) -> u64
pub const fn next_outbound(&self) -> u64
Returns the next outbound sequence number.
Sourcepub fn trading_day(&self) -> &[u8] ⓘ
pub fn trading_day(&self) -> &[u8] ⓘ
Returns the trading day bytes.
Sourcepub fn validate_checksum(&self) -> bool
pub fn validate_checksum(&self) -> bool
Returns true when the stored checksum matches the snapshot payload.
Trait Implementations§
Source§impl Clone for FixOwnedSequenceSnapshot
impl Clone for FixOwnedSequenceSnapshot
Source§impl Debug for FixOwnedSequenceSnapshot
impl Debug for FixOwnedSequenceSnapshot
impl Eq for FixOwnedSequenceSnapshot
Source§impl PartialEq for FixOwnedSequenceSnapshot
impl PartialEq for FixOwnedSequenceSnapshot
impl StructuralPartialEq for FixOwnedSequenceSnapshot
Auto Trait Implementations§
impl Freeze for FixOwnedSequenceSnapshot
impl RefUnwindSafe for FixOwnedSequenceSnapshot
impl Send for FixOwnedSequenceSnapshot
impl Sync for FixOwnedSequenceSnapshot
impl Unpin for FixOwnedSequenceSnapshot
impl UnsafeUnpin for FixOwnedSequenceSnapshot
impl UnwindSafe for FixOwnedSequenceSnapshot
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