pub struct StatementBuilder { /* private fields */ }Expand description
A Type that knows how to construct Statement.
Implementations§
Source§impl StatementBuilder
impl StatementBuilder
Sourcepub fn id(self, val: &str) -> Result<Self, DataError>
pub fn id(self, val: &str) -> Result<Self, DataError>
Set the id field parsing the argument as a UUID.
Raise DataError if argument is empty, cannot be parsed into a
valid UUID, or is all zeroes (nil UUID) or ones (max UUID).
Sourcepub fn id_as_uuid(self, uuid: Uuid) -> Result<Self, DataError>
pub fn id_as_uuid(self, uuid: Uuid) -> Result<Self, DataError>
Set the id field from given UUID.
Raise DataError if argument is empty, or is all zeroes (nil UUID)
or ones (max UUID).
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: StatementObject) -> Result<Self, DataError>
pub fn object(self, val: StatementObject) -> 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 from a string.
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
Set the timestamp field from a DateTime value.
Sourcepub fn stored(self, val: &str) -> Result<Self, DataError>
pub fn stored(self, val: &str) -> Result<Self, DataError>
Set the stored field from a string.
Raise DataError if the argument is empty or invalid.
Sourcepub fn with_stored(self, val: DateTime<Utc>) -> Self
pub fn with_stored(self, val: DateTime<Utc>) -> Self
Set the stored field from a DateTime value.
Set the authority field.
Raise DataError if the argument is invalid.
Sourcepub fn version(self, val: &str) -> Result<Self, DataError>
pub fn version(self, val: &str) -> Result<Self, DataError>
Set the version field.
Raise DataError if the argument is empty or invalid.
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.