pub struct TestRequest(pub Message);Expand description
TestRequest (35=1).
Tuple Fields§
§0: MessageImplementations§
Source§impl TestRequest
impl TestRequest
pub const MSG_TYPE: &'static str = "1"
pub fn new(test_req_id: impl Into<String>) -> Self
Sourcepub fn from_message(msg: Message) -> Result<Self, Message>
pub fn from_message(msg: Message) -> Result<Self, Message>
Wrap a generic message; fails unless 35=“1”.
pub fn test_req_id(&self) -> Result<String, ConversionError>
pub fn set_test_req_id(&mut self, v: impl Into<String>)
pub fn has_test_req_id(&self) -> bool
Methods from Deref<Target = Message>§
pub fn msg_type(&self) -> Result<String>
pub fn is_admin(&self) -> bool
pub fn seq_num(&self) -> Result<u64>
pub fn poss_dup(&self) -> bool
Sourcepub fn structure_error(&self) -> Option<Tag>
pub fn structure_error(&self) -> Option<Tag>
First tag found out of section order during parse, if any.
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Serialize, computing BodyLength(9) and CheckSum(10).
Header order matches the reference engines: 8, 9, 35, then remaining header fields in ascending tag order. Body keeps insertion (wire) order. Trailer: descending tag order (SignatureLength before Signature), CheckSum last.
Sourcepub fn set_header(&mut self, tag: Tag, value: impl FixEncode)
pub fn set_header(&mut self, tag: Tag, value: impl FixEncode)
Set a header field (helper).
Sourcepub fn stamp_sending_time(&mut self, ts: UtcTimestamp)
pub fn stamp_sending_time(&mut self, ts: UtcTimestamp)
Stamp SendingTime(52) with now at the given precision.
Trait Implementations§
Source§impl Clone for TestRequest
impl Clone for TestRequest
Source§fn clone(&self) -> TestRequest
fn clone(&self) -> TestRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TestRequest
impl Debug for TestRequest
Source§impl Deref for TestRequest
impl Deref for TestRequest
Source§impl DerefMut for TestRequest
impl DerefMut for TestRequest
Source§impl From<TestRequest> for Message
impl From<TestRequest> for Message
Source§fn from(m: TestRequest) -> Message
fn from(m: TestRequest) -> Message
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TestRequest
impl RefUnwindSafe for TestRequest
impl Send for TestRequest
impl Sync for TestRequest
impl Unpin for TestRequest
impl UnsafeUnpin for TestRequest
impl UnwindSafe for TestRequest
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