Skip to main content

AiLearningContext

Struct AiLearningContext 

Source
pub struct AiLearningContext<'a> {
    pub graph: &'a Graph,
    pub model_ref: String,
    pub model_hash: String,
    pub recipe: Recipe,
    pub recipe_ref: String,
    pub recipe_hash: String,
    pub seed: u64,
    pub created_at: String,
    pub authority_config_ref: Option<String>,
    pub authority: Option<AuthorityEnvironment>,
    pub authority_cases: Vec<AuthorityCase>,
    pub policy_info: BTreeMap<String, PolicyInfo>,
}

Fields§

§graph: &'a Graph§model_ref: String§model_hash: String§recipe: Recipe§recipe_ref: String§recipe_hash: String§seed: u64§created_at: String§authority_config_ref: Option<String>§authority: Option<AuthorityEnvironment>§authority_cases: Vec<AuthorityCase>§policy_info: BTreeMap<String, PolicyInfo>

Implementations§

Source§

impl<'a> AiLearningContext<'a>

Source

pub fn build( graph: &'a Graph, model_ref: String, recipe: Recipe, recipe_ref: String, seed_override: Option<u64>, created_at_override: Option<String>, authority: Option<AuthorityEnvironment>, authority_config_ref: Option<String>, ) -> Result<Self, String>

Source

pub fn require_authority(&self, needed_for: &str) -> Result<(), String>

Source

pub fn provenance( &self, source_refs: Vec<String>, generation_method: &str, review_status: &str, ) -> Provenance

Auto Trait Implementations§

§

impl<'a> Forget for AiLearningContext<'a>

§

impl<'a> Freeze for AiLearningContext<'a>

§

impl<'a> Move for AiLearningContext<'a>

§

impl<'a> RefUnwindSafe for AiLearningContext<'a>

§

impl<'a> Send for AiLearningContext<'a>
where &'a Graph: Send, RawVecInner: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send, RawTable<usize>: Send, RawTable<(String, Value)>: Send, Arc<Mutex<Vec<AuthorityTrace>>>: Send, &'static str: Send, NodeRef<Owned, String, PolicyInfo, LeafOrInternal>: Send, BoxRaw<(String, PolicyInfo)>: Send,

§

impl<'a> Sync for AiLearningContext<'a>
where RawTable<usize>: Sync, RawVecInner: Sync, RawTable<(String, Value)>: Sync, NodeRef<Owned, String, Value, LeafOrInternal>: Sync, BoxRaw<(String, Value)>: Sync, BoxRaw<Expression>: Sync, OnceLock<NormalizedExpression>: Sync, OnceCell<Regex>: Sync, BoxRaw<FieldType>: Sync, NonZero<i32>: Sync, BoxRaw<TypedValue>: Sync, RawTable<(ConceptId, ())>: Sync, Arc<Mutex<Vec<AuthorityTrace>>>: Sync, NodeRef<Owned, String, PolicyInfo, LeafOrInternal>: Sync, BoxRaw<(String, PolicyInfo)>: Sync,

§

impl<'a> Unpin for AiLearningContext<'a>
where &'a Graph: Unpin, *const u8 is !null: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin, Arc<Mutex<Vec<AuthorityTrace>>>: Unpin, &'static str: Unpin, *const LeafNode<String, PolicyInfo> is !null: Unpin, Box<(String, PolicyInfo)>: Unpin,

§

impl<'a> UnsafeUnpin for AiLearningContext<'a>

§

impl<'a> UnwindSafe for AiLearningContext<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.