pub struct UserResponse {
pub user_request_id: String,
pub username: String,
pub user_status: UserStatus,
pub user_status_text: Option<String>,
pub raw_data_length: Option<i32>,
pub raw_data: Option<Vec<u8>>,
pub deribit_label: Option<String>,
}Expand description
User Response message (MsgType = ‘BF’)
Fields§
§user_request_id: StringUser request ID
username: StringUsername
user_status: UserStatusUser status
user_status_text: Option<String>User status text
raw_data_length: Option<i32>Raw data length
raw_data: Option<Vec<u8>>Raw data
deribit_label: Option<String>Custom label
Implementations§
Source§impl UserResponse
impl UserResponse
Sourcepub fn new(
user_request_id: String,
username: String,
user_status: UserStatus,
) -> Self
pub fn new( user_request_id: String, username: String, user_status: UserStatus, ) -> Self
Create a new user response
Sourcepub fn logged_in(user_request_id: String, username: String) -> Self
pub fn logged_in(user_request_id: String, username: String) -> Self
Create a successful login response
Sourcepub fn logged_out(user_request_id: String, username: String) -> Self
pub fn logged_out(user_request_id: String, username: String) -> Self
Create a successful logout response
Sourcepub fn password_changed(user_request_id: String, username: String) -> Self
pub fn password_changed(user_request_id: String, username: String) -> Self
Create a password changed response
Sourcepub fn user_not_recognised(user_request_id: String, username: String) -> Self
pub fn user_not_recognised(user_request_id: String, username: String) -> Self
Create an error response for unrecognized user
Sourcepub fn password_incorrect(user_request_id: String, username: String) -> Self
pub fn password_incorrect(user_request_id: String, username: String) -> Self
Create an error response for incorrect password
Sourcepub fn error(
user_request_id: String,
username: String,
error_text: String,
) -> Self
pub fn error( user_request_id: String, username: String, error_text: String, ) -> Self
Create a generic error response
Sourcepub fn with_user_status_text(self, user_status_text: String) -> Self
pub fn with_user_status_text(self, user_status_text: String) -> Self
Set user status text
Sourcepub fn with_raw_data(self, raw_data: Vec<u8>) -> Self
pub fn with_raw_data(self, raw_data: Vec<u8>) -> Self
Set raw data
Sourcepub fn with_label(self, label: String) -> Self
pub fn with_label(self, label: String) -> Self
Set custom label
Sourcepub fn to_fix_message(
&self,
sender_comp_id: &str,
target_comp_id: &str,
msg_seq_num: u32,
) -> DeribitFixResult<String>
pub fn to_fix_message( &self, sender_comp_id: &str, target_comp_id: &str, msg_seq_num: u32, ) -> DeribitFixResult<String>
Convert to FIX message
Trait Implementations§
Source§impl Clone for UserResponse
impl Clone for UserResponse
Source§fn clone(&self) -> UserResponse
fn clone(&self) -> UserResponse
Returns a duplicate 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 UserResponse
impl Debug for UserResponse
Source§impl<'de> Deserialize<'de> for UserResponse
impl<'de> Deserialize<'de> for UserResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for UserResponse
impl Display for UserResponse
Source§impl PartialEq for UserResponse
impl PartialEq for UserResponse
Source§impl Serialize for UserResponse
impl Serialize for UserResponse
impl StructuralPartialEq for UserResponse
Auto Trait Implementations§
impl Freeze for UserResponse
impl RefUnwindSafe for UserResponse
impl Send for UserResponse
impl Sync for UserResponse
impl Unpin for UserResponse
impl UnwindSafe for UserResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.