#[non_exhaustive]pub struct Citation {
pub start_index: i32,
pub end_index: i32,
pub uri: String,
pub title: String,
pub license: String,
pub publication_date: Option<Date>,
/* private fields */
}Available on crate feature
prediction-service only.Expand description
Source attributions for content.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.start_index: i32Output only. Start index into the content.
end_index: i32Output only. End index into the content.
uri: StringOutput only. Url reference of the attribution.
title: StringOutput only. Title of the attribution.
license: StringOutput only. License of the attribution.
publication_date: Option<Date>Output only. Publication date of the attribution.
Implementations§
Source§impl Citation
impl Citation
pub fn new() -> Self
Sourcepub fn set_start_index<T: Into<i32>>(self, v: T) -> Self
pub fn set_start_index<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_end_index<T: Into<i32>>(self, v: T) -> Self
pub fn set_end_index<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_license<T: Into<String>>(self, v: T) -> Self
pub fn set_license<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_publication_date<T>(self, v: T) -> Self
pub fn set_publication_date<T>(self, v: T) -> Self
Sets the value of publication_date.
§Example
ⓘ
use gtype::model::Date;
let x = Citation::new().set_publication_date(Date::default()/* use setters */);Sourcepub fn set_or_clear_publication_date<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_publication_date<T>(self, v: Option<T>) -> Self
Sets or clears the value of publication_date.
§Example
ⓘ
use gtype::model::Date;
let x = Citation::new().set_or_clear_publication_date(Some(Date::default()/* use setters */));
let x = Citation::new().set_or_clear_publication_date(None::<Date>);Trait Implementations§
impl StructuralPartialEq for Citation
Auto Trait Implementations§
impl Freeze for Citation
impl RefUnwindSafe for Citation
impl Send for Citation
impl Sync for Citation
impl Unpin for Citation
impl UnwindSafe for Citation
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