pub struct ProviderEntry {
pub tag: Tag,
pub kind: ProviderKind,
pub base: String,
pub wire: Wire,
pub models: Vec<Model>,
pub key: Option<Key>,
pub lineups: Vec<Lineup>,
}Expand description
A provider as the file holds it.
Fields§
§tag: TagThe person’s own name for it, which stands in front of a model name.
kind: ProviderKindWhich service it is.
base: StringWhere it answers, without a trailing slash.
wire: WireThe shape it speaks.
models: Vec<Model>What it was last seen to offer. Empty until it has been asked.
key: Option<Key>The key it is reached with, for a provider that needs one.
lineups: Vec<Lineup>The named orders of its models. Empty until the person has written one: an order is their own decision about which of the models to lean on, and no service publishes one.
Implementations§
Source§impl ProviderEntry
impl ProviderEntry
Sourcepub fn new(tag: Tag, kind: ProviderKind, base: &str) -> Self
pub fn new(tag: Tag, kind: ProviderKind, base: &str) -> Self
A provider of kind at base, named tag, with nothing asked of it yet.
A ready-made kind starts with the models its maker publishes, so the page and the profile wizard have something to offer before the service has been asked anything.
Sourcepub fn address(&self, path: &str) -> String
pub fn address(&self, path: &str) -> String
The address path sits at under this provider’s base, which is what the page shows
before a request goes out.
Sourcepub fn api_address(&self, wire: Wire, path: &str) -> String
pub fn api_address(&self, wire: Wire, path: &str) -> String
The address path of this provider’s API sits at for a request of shape wire; see
ProviderKind::api_address.
Sourcepub fn messages_address(&self) -> String
pub fn messages_address(&self) -> String
Where a message to model would go. The page prints this before the person presses
anything, so that nothing leaves the machine towards an address they have not read.
Trait Implementations§
Source§impl Clone for ProviderEntry
impl Clone for ProviderEntry
Source§impl Debug for ProviderEntry
impl Debug for ProviderEntry
impl Eq for ProviderEntry
Source§impl PartialEq for ProviderEntry
impl PartialEq for ProviderEntry
impl StructuralPartialEq for ProviderEntry
Auto Trait Implementations§
impl Freeze for ProviderEntry
impl RefUnwindSafe for ProviderEntry
impl Send for ProviderEntry
impl Sync for ProviderEntry
impl Unpin for ProviderEntry
impl UnsafeUnpin for ProviderEntry
impl UnwindSafe for ProviderEntry
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§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>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> 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