pub struct EntityBuilder<'a> { /* private fields */ }Expand description
Builder for entity values (used in CreateEntity).
Implementations§
Source§impl<'a> EntityBuilder<'a>
impl<'a> EntityBuilder<'a>
Sourcepub fn text(
self,
property: Id,
value: impl Into<Cow<'a, str>>,
language: Option<Id>,
) -> Self
pub fn text( self, property: Id, value: impl Into<Cow<'a, str>>, language: Option<Id>, ) -> Self
Adds a TEXT value.
Sourcepub fn point(self, property: Id, lon: f64, lat: f64, alt: Option<f64>) -> Self
pub fn point(self, property: Id, lon: f64, lat: f64, alt: Option<f64>) -> Self
Adds a POINT value (longitude, latitude, optional altitude).
Sourcepub fn date(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
pub fn date(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
Adds a DATE value in RFC 3339 format.
§Arguments
value- RFC 3339 date string (e.g., “2024-01-15” or “2024-01-15+05:30”)
Sourcepub fn time(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
pub fn time(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
Adds a TIME value in RFC 3339 format.
§Arguments
value- RFC 3339 time string (e.g., “14:30:45.123456Z” or “14:30:45+05:30”)
Sourcepub fn datetime(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
pub fn datetime(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
Adds a DATETIME value in RFC 3339 format.
§Arguments
value- RFC 3339 datetime string (e.g., “2024-01-15T14:30:45.123456Z”)
Sourcepub fn schedule(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
pub fn schedule(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
Adds a SCHEDULE value (RFC 5545 iCalendar format).
Trait Implementations§
Source§impl<'a> Clone for EntityBuilder<'a>
impl<'a> Clone for EntityBuilder<'a>
Source§fn clone(&self) -> EntityBuilder<'a>
fn clone(&self) -> EntityBuilder<'a>
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<'a> Debug for EntityBuilder<'a>
impl<'a> Debug for EntityBuilder<'a>
Source§impl<'a> Default for EntityBuilder<'a>
impl<'a> Default for EntityBuilder<'a>
Source§fn default() -> EntityBuilder<'a>
fn default() -> EntityBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for EntityBuilder<'a>
impl<'a> RefUnwindSafe for EntityBuilder<'a>
impl<'a> Send for EntityBuilder<'a>
impl<'a> Sync for EntityBuilder<'a>
impl<'a> Unpin for EntityBuilder<'a>
impl<'a> UnwindSafe for EntityBuilder<'a>
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