pub struct Instantiable {
pub capability: &'static str,
pub binding_prefix: &'static str,
pub options: &'static [&'static str],
pub required: &'static [&'static str],
pub bare: bool,
}Expand description
A capability a context may declare instances of (S4a, #1966, track D3).
Fields§
§capability: &'static strThe capability’s name in its unit (Kv).
binding_prefix: &'static strThe prefix of each instance’s Worker binding name: KV makes
capability Sessions = Kv bind as KV_SESSIONS.
options: &'static [&'static str]The creation options (@name(…)) an instance may carry; any other is
refused. Empty when the kind takes none yet. Each takes one string
literal (@worker("legacy-billing")).
required: &'static [&'static str]The options every instance must carry (interop I5, #1972): a
Service names the Worker it reaches, so it has no default. A subset
of Instantiable::options.
bare: boolWhether the base capability is usable bare, through given Kv, as
well as through instances. false for a kind whose every use needs an
option: a bare Service would name no Worker.
Trait Implementations§
Source§impl Clone for Instantiable
impl Clone for Instantiable
impl Copy for Instantiable
Source§impl Debug for Instantiable
impl Debug for Instantiable
impl Eq for Instantiable
Source§impl PartialEq for Instantiable
impl PartialEq for Instantiable
impl StructuralPartialEq for Instantiable
Auto Trait Implementations§
impl Freeze for Instantiable
impl RefUnwindSafe for Instantiable
impl Send for Instantiable
impl Sync for Instantiable
impl Unpin for Instantiable
impl UnsafeUnpin for Instantiable
impl UnwindSafe for Instantiable
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