pub struct Res {Show 14 fields
pub template: Template,
pub token: KindToken,
pub annotations: BTreeMap<String, Value>,
pub history: bool,
pub frame: Option<FrameFacts>,
pub packed: bool,
pub block: bool,
pub priority_data: bool,
pub express: bool,
pub longest_bytes: Option<u64>,
pub link_v2: bool,
pub epoch: Option<String>,
pub tombstone_only: bool,
pub cardinality: Option<u64>,
}Expand description
One resource as the plan reads it: its template, its kind token, its
resolved annotations, whether it declares history (core §2.5), and,
for a frame resource (core §7.7), what the plan weighs of its frames;
and what link.v2 reads of it (v2 §2.16, §2.17): whether its type is
packed, whether its congestion is block, its longest put, and whether
its contract lists link.v2.
Fields§
§template: Template§token: KindToken§annotations: BTreeMap<String, Value>§history: bool§frame: Option<FrameFacts>§packed: boolIts type is packed (core §7.6); a frame resource’s always is. Read across revisions, packed only where every one types it packed (v2 §2.3).
block: boolIts congestion is block (core §2.4); across revisions, where any
one declares it so.
priority_data: boolIts priority is data (core §2.4); across revisions, where every
one declares it so. Another priority adds a QoS extension to the
push and the frame (link.v1 §2.8).
express: boolIt is express (core §2.4); across revisions, where any one is.
longest_bytes: Option<u64>Its longest put’s payload, in bytes: a packed record’s longest
(every optional field present) after an ENVELOPE_BYTES envelope,
or a frame resource’s largest frame. None for any other type.
Across revisions, the longest of those that declare it block, or
of every one where none does.
link_v2: boolThe revision that declares it lists link.v2 (v2 §2.17).
epoch: Option<String>The parameter its template declares as its epoch (core §4.3), whose
members hold member tokens: on a device face, epoch_on_device (v2
§2.5). Across revisions, any one’s.
tombstone_only: boolA state whose deletes only a tombstone proves (v2 §2.11, 0.9; core
S3): a per-key resource (core §4.2), or a template whose first chunk
is a parameter, which has no snapshot key. tombstone_only reads
it; across revisions, where any one is.
cardinality: Option<u64>A templated resource’s cardinality (core §2.2), which an owner
heartbeat’s longest put reads of a collection (v2 §2.16): None
for a template with no parameter, and for a templated one that
states none, read there as no ceiling. Across revisions, the
largest any one states.
Implementations§
Source§impl Res
impl Res
Sourcepub fn new(
template: Template,
token: KindToken,
annotations: BTreeMap<String, Value>,
) -> Self
pub fn new( template: Template, token: KindToken, annotations: BTreeMap<String, Value>, ) -> Self
A resource of token at template, with resolved annotations, and
nothing else stated: no history, no frame, a type that is not packed,
drop at priority data and not express, no cardinality, in a
revision that does not list link.v2 and uses no profile
(tombstone_only).
Sourcepub fn shape(&self) -> Shape
pub fn shape(&self) -> Shape
Its shape, as crossing_v2 reads it.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Res
impl Freeze for Reswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Segment>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for Res
impl RefUnwindSafe for Res
impl Send for Res
impl Sync for Res
impl Unpin for Res
impl UnsafeUnpin for Reswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Segment>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for Res
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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