pub struct OrgRequiredMarkerV1 {
pub schema: String,
pub organization_id: TeamId,
pub entries: Vec<OrgRequiredMarkerEntryV1>,
}Expand description
The endpoint’s durable record that an organization policy is, or was, required. It only grows: a lifted requirement stays on record.
Fields§
§schema: String§organization_id: TeamId§entries: Vec<OrgRequiredMarkerEntryV1>Oldest first; the last entry is the current state.
Implementations§
Source§impl OrgRequiredMarkerV1
impl OrgRequiredMarkerV1
Sourcepub fn first(
organization_id: TeamId,
entry: OrgRequiredMarkerEntryV1,
) -> Result<Self, ValidationError>
pub fn first( organization_id: TeamId, entry: OrgRequiredMarkerEntryV1, ) -> Result<Self, ValidationError>
A new marker with its first accepted state.
pub fn validate(&self) -> Result<(), ValidationError>
Sourcepub fn current(&self) -> &OrgRequiredMarkerEntryV1
pub fn current(&self) -> &OrgRequiredMarkerEntryV1
The current state: the newest entry.
Sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
Whether the newest state is a requirement.
Sourcepub fn advance(
&mut self,
organization_id: &TeamId,
entry: OrgRequiredMarkerEntryV1,
) -> Result<OrgRequiredMarkerAdvance, ValidationError>
pub fn advance( &mut self, organization_id: &TeamId, entry: OrgRequiredMarkerEntryV1, ) -> Result<OrgRequiredMarkerAdvance, ValidationError>
Records the next accepted state for organization_id.
Refuses another organization, a lower sequence, an equal sequence with
other content, and a requirement at the sequence of an unpin. The same
state again is Unchanged. Nothing is ever removed.
pub fn canonical_bytes(&self) -> Result<Vec<u8>, ValidationError>
Sourcepub fn parse(bytes: &[u8]) -> Result<Self, ValidationError>
pub fn parse(bytes: &[u8]) -> Result<Self, ValidationError>
Parses a stored marker: bounded, strict, and byte-for-byte canonical.
pub fn digest(&self) -> Result<RecordDigest, ValidationError>
Trait Implementations§
Source§impl Clone for OrgRequiredMarkerV1
impl Clone for OrgRequiredMarkerV1
Source§impl Debug for OrgRequiredMarkerV1
impl Debug for OrgRequiredMarkerV1
Source§impl<'de> Deserialize<'de> for OrgRequiredMarkerV1
impl<'de> Deserialize<'de> for OrgRequiredMarkerV1
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
impl Eq for OrgRequiredMarkerV1
Source§impl PartialEq for OrgRequiredMarkerV1
impl PartialEq for OrgRequiredMarkerV1
Source§impl Serialize for OrgRequiredMarkerV1
impl Serialize for OrgRequiredMarkerV1
impl StructuralPartialEq for OrgRequiredMarkerV1
Auto Trait Implementations§
impl Forget for OrgRequiredMarkerV1
impl Freeze for OrgRequiredMarkerV1
impl Move for OrgRequiredMarkerV1
impl RefUnwindSafe for OrgRequiredMarkerV1
impl Send for OrgRequiredMarkerV1
impl Sync for OrgRequiredMarkerV1
impl Unpin for OrgRequiredMarkerV1
impl UnsafeUnpin for OrgRequiredMarkerV1
impl UnwindSafe for OrgRequiredMarkerV1
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