pub enum Countable {
Counter(Arc<Mutex<Counter>>),
Phase(Arc<Mutex<Phase>>),
Chain(Arc<Mutex<Chain>>),
}
Variants§
Implementations§
Source§impl Countable
impl Countable
pub fn new( name: &str, kind: CountableKind, owner_uuid: Uuid, parent: Option<CountableId>, ) -> Self
pub fn add_child_checked(&self, child: CountableId) -> Result<(), AppError>
pub fn add_child(&self, child: CountableId)
pub fn uuid_checked(&self) -> Result<Uuid, AppError>
pub fn uuid(&self) -> Uuid
pub fn name_checked(&self) -> Result<String, AppError>
pub fn name(&self) -> String
pub fn set_name_checked(&self, name: &str) -> Result<(), AppError>
pub fn set_name(&self, name: &str)
pub fn created_at_checked(&self) -> Result<NaiveDateTime, AppError>
pub fn created_at(&self) -> NaiveDateTime
pub fn last_edit_checked(&self) -> Result<NaiveDateTime, AppError>
pub fn last_edit(&self) -> NaiveDateTime
pub fn is_archived_checked(&self) -> Result<bool, AppError>
pub fn is_archived(&self) -> bool
pub fn as_js(&self) -> Result<JsValue, AppError>
pub fn from_js(val: JsValue) -> Result<Self, AppError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Countable
impl<'de> Deserialize<'de> for Countable
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 From<&Countable> for CountableId
impl From<&Countable> for CountableId
Source§impl From<ArchiveCountable> for Countable
impl From<ArchiveCountable> for Countable
Source§fn from(value: ArchiveCountable) -> Self
fn from(value: ArchiveCountable) -> Self
Converts to this type from the input type.
Source§impl From<Countable> for ArchiveCountable
impl From<Countable> for ArchiveCountable
Source§impl From<Countable> for CountableId
impl From<Countable> for CountableId
Source§impl Savable for Countable
impl Savable for Countable
fn indexed_db_name(&self) -> String
fn save_indexed<'a>( &'a self, obj: ObjectStore<AppError>, ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + 'a>>
fn save_endpoint( &self, ) -> Pin<Box<dyn Future<Output = Result<(), ServerFnError>>>>
fn message(&self) -> Option<View>
fn clone_box(&self) -> Box<dyn Savable>
fn has_change(&self) -> bool
impl Eq for Countable
Auto Trait Implementations§
impl Freeze for Countable
impl RefUnwindSafe for Countable
impl Send for Countable
impl Sync for Countable
impl Unpin for Countable
impl UnwindSafe for Countable
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key
and return true
if they are equal.Source§impl<T> FromFormData for Twhere
T: DeserializeOwned,
impl<T> FromFormData for Twhere
T: DeserializeOwned,
Source§fn from_event(ev: &Event) -> Result<T, FromFormDataError>
fn from_event(ev: &Event) -> Result<T, FromFormDataError>
Tries to deserialize the data, given only the
submit
event.Source§impl<CustErr, T, Request> FromReq<Cbor, Request, CustErr> for T
impl<CustErr, T, Request> FromReq<Cbor, Request, CustErr> for T
Source§async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the arguments from a request.
Source§impl<CustErr, T, Request> FromReq<GetUrl, Request, CustErr> for T
impl<CustErr, T, Request> FromReq<GetUrl, Request, CustErr> for T
Source§async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the arguments from a request.
Source§impl<CustErr, T, Request> FromReq<Json, Request, CustErr> for T
impl<CustErr, T, Request> FromReq<Json, Request, CustErr> for T
Source§async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the arguments from a request.
Source§impl<CustErr, T, Request> FromReq<PostUrl, Request, CustErr> for T
impl<CustErr, T, Request> FromReq<PostUrl, Request, CustErr> for T
Source§async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the arguments from a request.
Source§impl<CustErr, T, Response> FromRes<Cbor, Response, CustErr> for T
impl<CustErr, T, Response> FromRes<Cbor, Response, CustErr> for T
Source§async fn from_res(res: Response) -> Result<T, ServerFnError<CustErr>>
async fn from_res(res: Response) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the outputs from a response.
Source§impl<CustErr, T, Response> FromRes<Json, Response, CustErr> for T
impl<CustErr, T, Response> FromRes<Json, Response, CustErr> for T
Source§async fn from_res(res: Response) -> Result<T, ServerFnError<CustErr>>
async fn from_res(res: Response) -> Result<T, ServerFnError<CustErr>>
Attempts to deserialize the outputs from a response.
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> 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>
Converts
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>
Converts
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 moreSource§impl<CustErr, T, Response> IntoRes<Cbor, Response, CustErr> for T
impl<CustErr, T, Response> IntoRes<Cbor, Response, CustErr> for T
Source§async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>
async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>
Attempts to serialize the output into an HTTP response.
Source§impl<CustErr, T, Response> IntoRes<Json, Response, CustErr> for T
impl<CustErr, T, Response> IntoRes<Json, Response, CustErr> for T
Source§async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>
async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>
Attempts to serialize the output into an HTTP response.