[][src]Struct activitystreams::primitives::XsdAnyUri

pub struct XsdAnyUri(_);

The type xsd:anyURI represents a Uniform Resource Identifier (URI) reference.

URIs are used to identify resources, and they may be absolute or relative. Absolute URIs provide the entire context for locating the resources, such as http://datypic.com/prod.html. Relative URIs are specified as the difference from a base URI, such as ../prod.html. It is also possible to specify a fragment identifier, using the # character, such as ../prod.html#shirt.

The three previous examples happen to be HTTP URLs (Uniform Resource Locators), but URIs also encompass URLs of other schemes (e.g., FTP, gopher, telnet), as well as URNs (Uniform Resource Names). URIs are not required to be dereferencable; that is, it is not necessary for there to be a web page at http://datypic.com/prod.html in order for this to be a valid URI.

URIs require that some characters be escaped with their hexadecimal Unicode code point preceded by the % character. This includes non-ASCII characters and some ASCII characters, namely control characters, spaces, and the following characters (unless they are used as deliimiters in the URI): <>#%{}|^`. For example, ../édition.html must be represented instead as ../%C3%A9dition.html, with the é escaped as %C3%A9. However, the anyURI type will accept these characters either escaped or unescaped. With the exception of the characters % and #, it will assume that unescaped characters are intended to be escaped when used in an actual URI, although the schema processor will do nothing to alter them. It is valid for an anyURI value to contain a space, but this practice is strongly discouraged. Spaces should instead be escaped using %20.

The schema processor is not required to parse the contents of an xsd:anyURI value to determine whether it is valid according to any particular URI scheme. Since the bare minimum rules for valid URI references are fairly generic, the schema processor will accept most character strings, including an empty value. The only values that are not accepted are ones that make inappropriate use of reserved characters, such as ones that contain multiple # characters or have % characters that are not followed by two hexadecimal digits.

Note that when relative URI references such as "../prod" are used as values of xsd:anyURI, no attempt is made to determine or keep track of the base URI to which they may be applied. For more information on URIs, see RFC 2396, Uniform Resource Identifiers (URI): Generic Syntax.

Implementations

impl XsdAnyUri[src]

pub fn as_str(&self) -> &str[src]

Borrow the underlying string from the XsdAnyUri

pub fn as_url(&self) -> &Url[src]

Borrow a url::Url from the XsdAnyUri

pub fn as_url_mut(&mut self) -> &mut Url[src]

Mutably borrow a url::Url from the XsdAnyUri

Trait Implementations

impl AsMut<Url> for XsdAnyUri[src]

impl AsRef<Url> for XsdAnyUri[src]

impl AsRef<str> for XsdAnyUri[src]

impl Clone for XsdAnyUri[src]

impl Debug for XsdAnyUri[src]

impl Default for XsdAnyUri[src]

impl<'de> Deserialize<'de> for XsdAnyUri[src]

impl Display for XsdAnyUri[src]

impl Eq for XsdAnyUri[src]

impl From<Url> for XsdAnyUri[src]

impl From<XsdAnyUri> for ActivityPropertiesResultTermEnum[src]

impl From<XsdAnyUri> for ActivityPropertiesInstrumentTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptTargetPropertiesActorTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptTargetPropertiesObjectTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptTargetPropertiesTargetTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptOriginPropertiesActorTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptOriginPropertiesObjectTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptOriginPropertiesOriginTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptOthersPropertiesActorTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptOthersPropertiesObjectTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptOthersPropertiesOriginTermEnum[src]

impl From<XsdAnyUri> for ActorAndObjectOptOthersPropertiesTargetTermEnum[src]

impl From<XsdAnyUri> for ActorOptOriginAndTargetPropertiesActorTermEnum[src]

impl From<XsdAnyUri> for ActorAndOriginPropertiesOriginTermEnum[src]

impl From<XsdAnyUri> for QuestionPropertiesOneOfTermEnum[src]

impl From<XsdAnyUri> for QuestionPropertiesAnyOfTermEnum[src]

impl From<XsdAnyUri> for ApActorPropertiesStreamsEnum[src]

impl From<XsdAnyUri> for CollectionPropertiesCurrentEnum[src]

impl From<XsdAnyUri> for CollectionPropertiesFirstEnum[src]

impl From<XsdAnyUri> for CollectionPropertiesLastTermEnum[src]

impl From<XsdAnyUri> for CollectionPagePropertiesPartOfEnum[src]

impl From<XsdAnyUri> for CollectionPagePropertiesNextEnum[src]

impl From<XsdAnyUri> for CollectionPagePropertiesPrevEnum[src]

impl From<XsdAnyUri> for ActorOptOriginAndTargetPropertiesOriginTermEnum[src]

impl From<XsdAnyUri> for LinkPropertiesContextTermEnum[src]

impl From<XsdAnyUri> for LinkPropertiesPreviewTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesAttachmentTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesAttributedToTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesAudienceTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesContextTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesGeneratorTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesIconTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesImageTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesInReplyToTermEnum[src]

impl From<XsdAnyUri> for ActorOptOriginAndTargetPropertiesTargetTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesLocationTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesPreviewTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesRepliesTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesTagTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesUrlTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesToTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesBtoTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesCcTermEnum[src]

impl From<XsdAnyUri> for ObjectPropertiesBccTermEnum[src]

impl From<XsdAnyUri> for PlacePropertiesUnitsEnum[src]

impl From<XsdAnyUri> for ActorAndObjectPropertiesActorTermEnum[src]

impl From<XsdAnyUri> for ProfilePropertiesDescribesEnum[src]

impl From<XsdAnyUri> for RelationshipPropertiesSubjectEnum[src]

impl From<XsdAnyUri> for RelationshipPropertiesObjectTermEnum[src]

impl From<XsdAnyUri> for RelationshipPropertiesRelationshipTermEnum[src]

impl From<XsdAnyUri> for TombstonePropertiesFormerTypeTermEnum[src]

impl From<XsdAnyUri> for ApObjectPropertiesSourceEnum[src]

impl From<XsdAnyUri> for ApObjectPropertiesUploadMediaEnum[src]

impl From<XsdAnyUri> for Url[src]

impl From<XsdAnyUri> for ActorAndObjectPropertiesObjectTermEnum[src]

impl From<XsdAnyUri> for ActorObjectAndTargetPropertiesActorTermEnum[src]

impl From<XsdAnyUri> for ActorObjectAndTargetPropertiesObjectTermEnum[src]

impl From<XsdAnyUri> for ActorObjectAndTargetPropertiesTargetTermEnum[src]

impl FromStr for XsdAnyUri[src]

type Err = XsdAnyUriError

The associated error which can be returned from parsing.

impl Hash for XsdAnyUri[src]

impl Ord for XsdAnyUri[src]

impl PartialEq<XsdAnyUri> for XsdAnyUri[src]

impl PartialOrd<XsdAnyUri> for XsdAnyUri[src]

impl Serialize for XsdAnyUri[src]

impl StructuralEq for XsdAnyUri[src]

impl StructuralPartialEq for XsdAnyUri[src]

impl<'_> TryFrom<&'_ mut str> for XsdAnyUri[src]

type Error = XsdAnyUriError

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ str> for XsdAnyUri[src]

type Error = XsdAnyUriError

The type returned in the event of a conversion error.

impl TryFrom<String> for XsdAnyUri[src]

type Error = XsdAnyUriError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.