pub struct Notification {Show 15 fields
pub name: String,
pub user: String,
pub portfolio: Option<String>,
pub id: u64,
pub type: i32,
pub action: Option<NotificationAction>,
pub state: i32,
pub title: String,
pub body: String,
pub metadata: HashMap<String, String>,
pub navigation_url: Option<String>,
pub create_time: Option<Timestamp>,
pub expire_time: Option<Timestamp>,
pub acknowledge_time: Option<Timestamp>,
pub symbol: Option<String>,
}Expand description
Notification resource
Fields§
§name: StringThe resource name of the Notification. Format: notifications/{notification_id}
user: StringThe resource name of User. Format: users/{user_id}
portfolio: Option<String>The resource name of Portfolio (optional). Format: portfolios/{id}
id: u64The id of Notification.
type: i32Notification type
action: Option<NotificationAction>Action to perform when clicked
state: i32Current state
title: StringNotification title
body: StringNotification body
metadata: HashMap<String, String>Additional metadata
Pre-computed navigation URL (convenience field) e.g., “/lp/A252670”
create_time: Option<Timestamp>Created timestamp
expire_time: Option<Timestamp>Expiration timestamp (if applicable)
acknowledge_time: Option<Timestamp>Acknowledged timestamp
symbol: Option<String>관련 심볼 (예: ETF 종목코드 KR7252670005). LP/주문 관련 알림(EtfLpEvent, QuickOrderError)이 채움. 심볼 무관 알림(System/Custom 등)은 비어있음.
Implementations§
Source§impl Notification
impl Notification
Sourcepub fn portfolio(&self) -> &str
pub fn portfolio(&self) -> &str
Returns the value of portfolio, or the default value if portfolio is unset.
Sourcepub fn type(&self) -> NotificationType
pub fn type(&self) -> NotificationType
Returns the enum value of type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_type(&mut self, value: NotificationType)
pub fn set_type(&mut self, value: NotificationType)
Sets type to the provided enum value.
Sourcepub fn state(&self) -> NotificationState
pub fn state(&self) -> NotificationState
Returns the enum value of state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_state(&mut self, value: NotificationState)
pub fn set_state(&mut self, value: NotificationState)
Sets state to the provided enum value.
Returns the value of navigation_url, or the default value if navigation_url is unset.
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Notification
impl Debug for Notification
Source§impl Default for Notification
impl Default for Notification
§impl<'de> Deserialize<'de> for Notification
impl<'de> Deserialize<'de> for Notification
§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>,
Source§impl Message for Notification
impl Message for Notification
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for Notification
impl PartialEq for Notification
Source§fn eq(&self, other: &Notification) -> bool
fn eq(&self, other: &Notification) -> bool
self and other values to be equal, and is used by ==.§impl Serialize for Notification
impl Serialize for Notification
impl StructuralPartialEq for Notification
Auto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
impl UnwindSafe for Notification
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request