pub struct AdHocModel { /* private fields */ }Implementations§
Source§impl AdHocModel
impl AdHocModel
pub fn new(world: Arc<dyn World>) -> Arc<dyn Model> ⓘ
pub fn into(model: Arc<dyn Model>) -> Arc<Self> ⓘ
pub fn inner(&self) -> &HttpServer
Sourcepub fn world(&self) -> Arc<dyn World> ⓘ
pub fn world(&self) -> Arc<dyn World> ⓘ
The world this model belongs to.
A model only runs while its world exists, the world owning it.
pub fn id(&self) -> Option<ModelId>
pub fn set_id(&self, id: ModelId)
pub fn parameter(&self, name: &str) -> Option<Value>
pub fn set_parameter(&self, param: &str, value: Value)
pub fn get_secret_headers(&self) -> string
pub fn get_port(&self) -> u16
pub fn get_host(&self) -> Arc<Ip> ⓘ
pub async fn new_incoming( &self, parent_track: Option<TrackId>, http_request: HttpRequest, params: &HashMap<String, Value>, callback: Option<Box<dyn FnOnce(Box<dyn Outputs>) -> Vec<TrackFuture> + Send>>, )
pub async fn new_failedBinding( &self, parent_track: Option<TrackId>, params: &HashMap<String, Value>, callback: Option<Box<dyn FnOnce(Box<dyn Outputs>) -> Vec<TrackFuture> + Send>>, )
Trait Implementations§
Source§impl Debug for AdHocModel
impl Debug for AdHocModel
Source§impl Model for AdHocModel
impl Model for AdHocModel
fn descriptor(&self) -> Arc<dyn Model> ⓘ
fn id(&self) -> Option<ModelId>
fn set_id(&self, id: ModelId)
fn set_parameter(&self, param: &str, value: Value)
Source§fn set_secrets_access(&self, access: SecretsAccess)
fn set_secrets_access(&self, access: SecretsAccess)
Gives the model its access to secrets, if its descriptor declares it.
Source§fn register_secret_sources(&self)
fn register_secret_sources(&self)
Registers the secret sources of the model, before any model is initialized.
fn initialize(&self)
fn shutdown(&self)
fn invoke_source(&self, source: &str, params: HashMap<String, Value>)
Auto Trait Implementations§
impl !Freeze for AdHocModel
impl !RefUnwindSafe for AdHocModel
impl !UnwindSafe for AdHocModel
impl Send for AdHocModel
impl Sync for AdHocModel
impl Unpin for AdHocModel
impl UnsafeUnpin for AdHocModel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.