pub struct Objective {
pub id: String,
pub kind: i32,
pub title: String,
pub description: String,
pub owner_user_id: String,
pub state: i32,
pub parent_objective_id: String,
pub ends_at: Option<Timestamp>,
pub indicator_count: i32,
pub created_at: Option<Timestamp>,
pub updated_at: Option<Timestamp>,
}Expand description
A qualitative statement of a state the organization wants to hold true. Owned by the organization, never by a single campaign. Content is always authored by the organization; the contract only carries structure.
Fields§
§id: StringUnique identifier for the objective.
kind: i32Whether this is a standing objective or a time-bounded initiative.
title: StringThe statement itself. Required. Constraints: Max length 300 characters.
description: StringLonger explanation of what the statement means and does not mean. Constraints: Max length 4000 characters.
owner_user_id: StringID of the user accountable for the objective. Optional.
state: i32Lifecycle state.
parent_objective_id: StringFor an initiative, the standing objective it contributes to. Empty when the initiative stands alone, and always empty for OBJECTIVE_KIND_OBJECTIVE.
ends_at: Option<Timestamp>For an initiative, the date it is expected to end. Unset for a standing objective, which by definition does not have one.
indicator_count: i32Number of indicators currently attached.
created_at: Option<Timestamp>Timestamp when the objective was created.
updated_at: Option<Timestamp>Timestamp when the objective was last updated.
Implementations§
Source§impl Objective
impl Objective
Sourcepub fn kind(&self) -> ObjectiveKind
pub fn kind(&self) -> ObjectiveKind
Returns the enum value of kind, or the default if the field is set to an invalid enum value.
Sourcepub fn set_kind(&mut self, value: ObjectiveKind)
pub fn set_kind(&mut self, value: ObjectiveKind)
Sets kind to the provided enum value.
Sourcepub fn state(&self) -> ObjectiveState
pub fn state(&self) -> ObjectiveState
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: ObjectiveState)
pub fn set_state(&mut self, value: ObjectiveState)
Sets state to the provided enum value.
Trait Implementations§
impl Eq for Objective
Source§impl Message for Objective
impl Message for Objective
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.impl StructuralPartialEq for Objective
Auto Trait Implementations§
impl Freeze for Objective
impl RefUnwindSafe for Objective
impl Send for Objective
impl Sync for Objective
impl Unpin for Objective
impl UnsafeUnpin for Objective
impl UnwindSafe for Objective
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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