pub struct Attachment { /* private fields */ }Expand description
Structure representing an important piece of data that is part of a Learning Record. Could be an essay, a video, etc…
Another example could be the image of a certificate that was granted as a result of an experience.
Implementations§
Source§impl Attachment
impl Attachment
Sourcepub fn builder() -> AttachmentBuilder<'static>
pub fn builder() -> AttachmentBuilder<'static>
Return an Attachment Builder.
Sourcepub fn usage_type(&self) -> &IriStr
pub fn usage_type(&self) -> &IriStr
Return usage_type as an IRI.
Sourcepub fn display(&self, tag: &MyLanguageTag) -> Option<&str>
pub fn display(&self, tag: &MyLanguageTag) -> Option<&str>
Return display for the given language tag if it exists; None otherwise.
Sourcepub fn display_as_map(&self) -> &LanguageMap
pub fn display_as_map(&self) -> &LanguageMap
Return a reference to display.
Sourcepub fn description(&self, tag: &MyLanguageTag) -> Option<&str>
pub fn description(&self, tag: &MyLanguageTag) -> Option<&str>
Return description for the given language tag if it exists; None
otherwise.
Sourcepub fn description_as_map(&self) -> Option<&LanguageMap>
pub fn description_as_map(&self) -> Option<&LanguageMap>
Return a reference to description if set; None otherwise.
Sourcepub fn content_type(&self) -> &Mime
pub fn content_type(&self) -> &Mime
Return content_type.
Sourcepub fn file_url_as_str(&self) -> Option<&str>
pub fn file_url_as_str(&self) -> Option<&str>
Return file_url as string reference if set; None otherwise.
Sourcepub fn set_file_url(&mut self, url: &str)
pub fn set_file_url(&mut self, url: &str)
Set the file_url field to the given value.
Sourcepub fn is_signature(&self) -> bool
pub fn is_signature(&self) -> bool
Return TRUE if this is a JWS signature; FALSE otherwise.
Trait Implementations§
Source§impl Clone for Attachment
impl Clone for Attachment
Source§fn clone(&self) -> Attachment
fn clone(&self) -> Attachment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Attachment
impl Debug for Attachment
Source§impl<'de> Deserialize<'de> for Attachment
impl<'de> Deserialize<'de> for Attachment
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 Display for Attachment
impl Display for Attachment
Source§impl PartialEq for Attachment
impl PartialEq for Attachment
Source§fn eq(&self, other: &Attachment) -> bool
fn eq(&self, other: &Attachment) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Attachment
impl Serialize for Attachment
Source§impl Validate for Attachment
impl Validate for Attachment
Source§fn validate(&self) -> Vec<ValidationError>
fn validate(&self) -> Vec<ValidationError>
Validate the instance and return a potentially empty collection of
ValidationError.
Source§fn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Convenience method to quickly assert if the type implementing this
trait is indeed valid. Read more
Source§fn check_validity(&self) -> Result<(), ValidationError>
fn check_validity(&self) -> Result<(), ValidationError>
Convenience method that checks the validity of a Validate instance and
raises a ValidationError if it was found to be invalid.
impl StructuralPartialEq for Attachment
Auto Trait Implementations§
impl Freeze for Attachment
impl RefUnwindSafe for Attachment
impl Send for Attachment
impl Sync for Attachment
impl Unpin for Attachment
impl UnsafeUnpin for Attachment
impl UnwindSafe for Attachment
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<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> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.