pub struct ComponentChange<'a> {
pub component_id: ComponentId,
pub op: ComponentOp,
pub actor: ActorAuthority,
pub old_value: Option<&'a [u8]>,
pub new_value: Option<&'a [u8]>,
pub proposer: Option<InboxId>,
pub is_dm_participant: bool,
pub key: Option<&'a [u8]>,
pub membership: Option<&'a HashSet<InboxId>>,
}Expand description
A change being proposed against a component, used as the input to
validate_component_write.
Carries everything a base policy may read: the
component, the element operation and key, the authenticated proposer
and its roles, and the membership after the commit. It never carries
the value being written into policy evaluation; new_value feeds only
component invariants.
old_value is the whole component before this proposal (None when
absent). Immutability reads it: an absent immutable component accepts
one first scalar Update or collection Inserts.
Construct via the generated builder so that old_value and new_value
(which share the same type) can’t be accidentally swapped:
let change = ComponentChange::builder()
.component_id(ComponentId::GROUP_NAME)
.op(ComponentOp::Update)
.actor(actor)
.old_value(&old_bytes)
.new_value(&new_bytes)
.build();Fields§
§component_id: ComponentId§op: ComponentOp§actor: ActorAuthority§old_value: Option<&'a [u8]>§new_value: Option<&'a [u8]>§proposer: Option<InboxId>The authenticated proposer. None fails every self test closed.
is_dm_participant: boolWhether the proposer is one of the conversation’s DM_MEMBERS.
key: Option<&'a [u8]>TLS encoding of the element key for a map or registry mutation;
None for a scalar, a set, or a whole-component Remove.
membership: Option<&'a HashSet<InboxId>>Inbox ids in GROUP_MEMBERSHIP after the commit, or the committed
membership for a standalone proposal. None fails every
non-member test closed.
Implementations§
Source§impl<'a> ComponentChange<'a>
impl<'a> ComponentChange<'a>
Sourcepub fn builder() -> ComponentChangeBuilder<'a>
pub fn builder() -> ComponentChangeBuilder<'a>
Create an instance of ComponentChange using the builder syntax
Trait Implementations§
Source§impl<'a> Clone for ComponentChange<'a>
impl<'a> Clone for ComponentChange<'a>
Source§fn clone(&self) -> ComponentChange<'a>
fn clone(&self) -> ComponentChange<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ComponentChange<'a>
impl<'a> RefUnwindSafe for ComponentChange<'a>
impl<'a> Send for ComponentChange<'a>
impl<'a> Sync for ComponentChange<'a>
impl<'a> Unpin for ComponentChange<'a>
impl<'a> UnsafeUnpin for ComponentChange<'a>
impl<'a> UnwindSafe for ComponentChange<'a>
Blanket Implementations§
§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read more§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read more§fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].