pub struct BoardOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a Board message.
Wraps ::buffa::OwnedView<BoardView<'static>>: the decoded view and the ::buffa::bytes::Bytes buffer it borrows from travel together, so the handle is 'static and Send + Sync — suitable for async handlers, spawned tasks, and anywhere a 'static bound is required.
Field accessors return borrows tied to &self. Use Self::view to get the full BoardView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl BoardOwnedView
impl BoardOwnedView
Sourcepub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
pub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
Decode an owned view from a ::buffa::bytes::Bytes buffer.
The view borrows directly from the buffer’s data; the buffer is retained inside the returned handle.
§Errors
Returns ::buffa::DecodeError if the buffer contains invalid
protobuf data.
Sourcepub fn decode_with_options(
bytes: Bytes,
opts: &DecodeOptions,
) -> Result<Self, DecodeError>
pub fn decode_with_options( bytes: Bytes, opts: &DecodeOptions, ) -> Result<Self, DecodeError>
Decode with custom ::buffa::DecodeOptions (recursion limit,
max message size).
§Errors
Returns ::buffa::DecodeError if the buffer is invalid or
exceeds the configured limits.
Sourcepub fn from_owned(msg: &Board) -> Result<Self, DecodeError>
pub fn from_owned(msg: &Board) -> Result<Self, DecodeError>
Build from an owned message via an encode → decode round-trip.
§Errors
Returns ::buffa::DecodeError if the re-encoded bytes are
somehow invalid (should not happen for well-formed messages).
Sourcepub fn view(&self) -> &BoardView<'_>
pub fn view(&self) -> &BoardView<'_>
Borrow the full BoardView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> Result<Board, DecodeError>
pub fn to_owned_message(&self) -> Result<Board, DecodeError>
Convert to the owned message type.
§Errors
Returns an error if re-materializing preserved unknown fields fails (e.g. the unknown-field limit is exceeded).
Sourcepub fn into_bytes(self) -> Bytes
pub fn into_bytes(self) -> Bytes
Consume the handle, returning the underlying bytes buffer.
Sourcepub fn owner_account_id(&self) -> u64
pub fn owner_account_id(&self) -> u64
Board owner account public ID.
Field 2: owner_account_id
Sourcepub fn title(&self) -> &str
pub fn title(&self) -> &str
Human-readable board title, max 200 characters and 400 bytes.
Field 3: title
Sourcepub fn audience(&self) -> EnumValue<BoardAudience>
pub fn audience(&self) -> EnumValue<BoardAudience>
Default audience policy used when no explicit ACL entry matches.
Field 4: audience
Sourcepub fn default_role(&self) -> EnumValue<BoardRole>
pub fn default_role(&self) -> EnumValue<BoardRole>
Default role granted by the audience policy. This is always VIEWER or EDITOR.
Field 5: default_role
Sourcepub fn access_version(&self) -> u64
pub fn access_version(&self) -> u64
Monotonic access version incremented when audience, default role, ACL, or archive state changes.
Field 6: access_version
Sourcepub fn initial_snapshot(&self) -> &MessageFieldView<StructView<'_>>
pub fn initial_snapshot(&self) -> &MessageFieldView<StructView<'_>>
Optional initial document snapshot as a JSON object.
Field 7: initial_snapshot
Sourcepub fn created_at(&self) -> &MessageFieldView<TimestampView<'_>>
pub fn created_at(&self) -> &MessageFieldView<TimestampView<'_>>
Creation time in UTC.
Field 8: created_at
Sourcepub fn updated_at(&self) -> &MessageFieldView<TimestampView<'_>>
pub fn updated_at(&self) -> &MessageFieldView<TimestampView<'_>>
Last update time in UTC.
Field 9: updated_at
Sourcepub fn archived_at(&self) -> &MessageFieldView<TimestampView<'_>>
pub fn archived_at(&self) -> &MessageFieldView<TimestampView<'_>>
Archive time in UTC. Unset when the board is active.
Field 10: archived_at
Trait Implementations§
Source§impl Clone for BoardOwnedView
impl Clone for BoardOwnedView
Source§fn clone(&self) -> BoardOwnedView
fn clone(&self) -> BoardOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more