pub struct CodeIdentity {
pub id: Uuid,
pub name: String,
pub purpose: String,
pub module_type: ModuleType,
pub created_at: DateTime<Utc>,
pub version: String,
pub dependencies: Vec<String>,
pub capabilities: Vec<String>,
pub state: ModuleState,
pub stats: ModuleStats,
}Expand description
Modul identitás - Ki vagyok?
Fields§
§id: UuidEgyedi azonosító
name: StringKi vagyok? - Név
purpose: StringMiért vagyok? - Cél
module_type: ModuleTypeModul típus
created_at: DateTime<Utc>Mikor születtem?
version: StringVerzió
dependencies: Vec<String>Függőségek
capabilities: Vec<String>Képességek
state: ModuleStateAktuális állapot
stats: ModuleStatsStatisztikák
Implementations§
Source§impl CodeIdentity
impl CodeIdentity
Sourcepub fn new(
name: impl Into<String>,
purpose: impl Into<String>,
module_type: ModuleType,
) -> Self
pub fn new( name: impl Into<String>, purpose: impl Into<String>, module_type: ModuleType, ) -> Self
Új identitás létrehozása
Sourcepub fn with_dependency(self, dep: impl Into<String>) -> Self
pub fn with_dependency(self, dep: impl Into<String>) -> Self
Függőség hozzáadása
Sourcepub fn with_capability(self, cap: impl Into<String>) -> Self
pub fn with_capability(self, cap: impl Into<String>) -> Self
Képesség hozzáadása
Sourcepub fn with_capabilities(self, caps: Vec<&str>) -> Self
pub fn with_capabilities(self, caps: Vec<&str>) -> Self
Több képesség hozzáadása
Sourcepub fn set_state(&mut self, state: ModuleState)
pub fn set_state(&mut self, state: ModuleState)
Állapot beállítása
Sourcepub fn age_minutes(&self) -> i64
pub fn age_minutes(&self) -> i64
Életkor percekben
Trait Implementations§
Source§impl Clone for CodeIdentity
impl Clone for CodeIdentity
Source§fn clone(&self) -> CodeIdentity
fn clone(&self) -> CodeIdentity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodeIdentity
impl Debug for CodeIdentity
Source§impl<'de> Deserialize<'de> for CodeIdentity
impl<'de> Deserialize<'de> for CodeIdentity
Source§fn 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
Source§impl Display for CodeIdentity
impl Display for CodeIdentity
Auto Trait Implementations§
impl Freeze for CodeIdentity
impl RefUnwindSafe for CodeIdentity
impl Send for CodeIdentity
impl Sync for CodeIdentity
impl Unpin for CodeIdentity
impl UnwindSafe for CodeIdentity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.