pub struct StateView {
pub database: DatabaseName,
pub name: StateViewName,
pub version: u64,
pub event_selector: EventSelector,
pub last_modified_revision: Option<u64>,
pub last_modified_timestamp: Option<DateTime<Utc>>,
pub content_type: String,
pub content_schema_url: Option<String>,
pub content: Option<Vec<u8>>,
}Expand description
A materialized state view.
Fields§
§database: DatabaseNameThe database this state view belongs to.
name: StateViewNameThe name of this state view.
version: u64The version of this state view definition.
event_selector: EventSelectorThe event selector that determines which events affect this view.
last_modified_revision: Option<u64>The revision at which this view was last modified, if any.
last_modified_timestamp: Option<DateTime<Utc>>The timestamp when this view was last modified, if any.
content_type: StringThe content type of the serialized state (e.g., “application/json”).
content_schema_url: Option<String>Optional URL to the schema for the content.
content: Option<Vec<u8>>The serialized state content, if any.
Implementations§
Source§impl StateView
impl StateView
Sourcepub fn has_content(&self) -> bool
pub fn has_content(&self) -> bool
Check if this state view has content.
Sourcepub fn content_bytes(&self) -> Option<&[u8]>
pub fn content_bytes(&self) -> Option<&[u8]>
Get the content as bytes, if present.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateView
impl RefUnwindSafe for StateView
impl Send for StateView
impl Sync for StateView
impl Unpin for StateView
impl UnwindSafe for StateView
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request