Struct teaclave_types::TaskState
source · [−]pub struct TaskState {Show 14 fields
pub task_id: Uuid,
pub creator: UserID,
pub function_id: ExternalID,
pub function_arguments: FunctionArguments,
pub executor: Executor,
pub inputs_ownership: TaskFileOwners,
pub outputs_ownership: TaskFileOwners,
pub function_owner: UserID,
pub participants: UserList,
pub approved_users: UserList,
pub assigned_inputs: TaskFiles<TeaclaveInputFile>,
pub assigned_outputs: TaskFiles<TeaclaveOutputFile>,
pub result: TaskResult,
pub status: TaskStatus,
}
Fields
task_id: Uuid
creator: UserID
function_id: ExternalID
function_arguments: FunctionArguments
executor: Executor
inputs_ownership: TaskFileOwners
outputs_ownership: TaskFileOwners
function_owner: UserID
participants: UserList
approved_users: UserList
assigned_inputs: TaskFiles<TeaclaveInputFile>
assigned_outputs: TaskFiles<TeaclaveOutputFile>
result: TaskResult
status: TaskStatus
Implementations
sourceimpl TaskState
impl TaskState
pub fn everyone_approved(&self) -> bool
pub fn all_data_assigned(&self) -> bool
pub fn has_participant(&self, user_id: &UserID) -> bool
pub fn has_creator(&self, user_id: &UserID) -> bool
pub fn is_ended(&self) -> bool
Trait Implementations
sourceimpl<'de> Deserialize<'de> for TaskState
impl<'de> Deserialize<'de> for TaskState
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Storable for TaskState
impl Storable for TaskState
fn key_prefix() -> &'static str
fn uuid(&self) -> Uuid
fn key_string(&self) -> String
fn key(&self) -> Vec<u8>
fn match_prefix(key: &str) -> bool
fn to_vec(&self) -> Result<Vec<u8>>
fn from_slice(bytes: &[u8]) -> Result<Self>
fn external_id(&self) -> ExternalID
Auto Trait Implementations
impl RefUnwindSafe for TaskState
impl Send for TaskState
impl Sync for TaskState
impl Unpin for TaskState
impl UnwindSafe for TaskState
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more