pub struct SubStatementBuilder { /* private fields */ }Expand description
A Type that knows how to construct a SubStatement.
Implementations§
Source§impl SubStatementBuilder
impl SubStatementBuilder
Sourcepub fn actor(self, val: Actor) -> Result<Self, DataError>
pub fn actor(self, val: Actor) -> Result<Self, DataError>
Set the actor field.
Raise DataError if the argument is invalid.
Sourcepub fn verb(self, val: Verb) -> Result<Self, DataError>
pub fn verb(self, val: Verb) -> Result<Self, DataError>
Set the verb field.
Raise DataError if the argument is invalid.
Sourcepub fn object(self, val: SubStatementObject) -> Result<Self, DataError>
pub fn object(self, val: SubStatementObject) -> Result<Self, DataError>
Set the object field.
Raise DataError if the argument is invalid.
Sourcepub fn result(self, val: XResult) -> Result<Self, DataError>
pub fn result(self, val: XResult) -> Result<Self, DataError>
Set the result field.
Raise DataError if the argument is invalid.
Sourcepub fn context(self, val: Context) -> Result<Self, DataError>
pub fn context(self, val: Context) -> Result<Self, DataError>
Set the context field.
Raise DataError if the argument is invalid.
Sourcepub fn timestamp(self, val: &str) -> Result<Self, DataError>
pub fn timestamp(self, val: &str) -> Result<Self, DataError>
Set the timestamp field.
Raise DataError if the argument is empty or invalid.
Sourcepub fn with_timestamp(self, val: DateTime<Utc>) -> Self
pub fn with_timestamp(self, val: DateTime<Utc>) -> Self
Replace the timestamp field w/ val.
Sourcepub fn attachment(self, att: Attachment) -> Result<Self, DataError>
pub fn attachment(self, att: Attachment) -> Result<Self, DataError>
Add att to attachments field if valid; otherwise raise a
DataError.
Sourcepub fn build(self) -> Result<SubStatement, DataError>
pub fn build(self) -> Result<SubStatement, DataError>
Create a SubStatement from set field values.
Raise DataError if an inconsistency is detected.
Trait Implementations§
Source§impl Debug for SubStatementBuilder
impl Debug for SubStatementBuilder
Source§impl Default for SubStatementBuilder
impl Default for SubStatementBuilder
Source§fn default() -> SubStatementBuilder
fn default() -> SubStatementBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SubStatementBuilder
impl RefUnwindSafe for SubStatementBuilder
impl Send for SubStatementBuilder
impl Sync for SubStatementBuilder
impl Unpin for SubStatementBuilder
impl UnsafeUnpin for SubStatementBuilder
impl UnwindSafe for SubStatementBuilder
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