[−][src]Struct activitystreams::BaseBox
A wrapper type around a generic Base
Methods
impl BaseBox
[src]
pub fn from_concrete<T>(t: T) -> Result<Self, Error> where
T: Base + Serialize,
[src]
T: Base + Serialize,
Coerce a concrete type into this wrapper type
This is done automatically via TryFrom in proprties setter methods
pub fn to_concrete<T>(self) -> Result<T, Error> where
T: Base + DeserializeOwned,
[src]
T: Base + DeserializeOwned,
Attempt to deserialize the wrapper type to a concrete type
Before this method is called, the type should be verified via the kind
or
is_kind
methods
pub fn is_kind(&self, kind: impl Display) -> bool
[src]
Return whether the given wrapper type is expected.
For example
use activitystreams::object::{ kind::ImageType, apub::Image, }; if my_wrapper_type.is_kind(ImageType) { let image = my_wrapper_type.to_concrete::<Image>()?; ... }
pub fn kind(&self) -> Option<&str>
[src]
Return the kind of wrapper type, if present
Example
match my_wrapper_type.kind() { Some("Image") => { let image = my_wrapper_type.to_concrete::<Image>()?; ... } _ => ..., }
Trait Implementations
impl Clone for BaseBox
[src]
impl Debug for BaseBox
[src]
impl<'de> Deserialize<'de> for BaseBox
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<BaseBox> for ActivityPropertiesResultTermEnum
[src]
fn from(item: BaseBox) -> ActivityPropertiesResultTermEnum
[src]
impl From<BaseBox> for ActivityPropertiesInstrumentTermEnum
[src]
fn from(item: BaseBox) -> ActivityPropertiesInstrumentTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptTargetPropertiesActorTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptTargetPropertiesObjectTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptTargetPropertiesTargetTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptOriginPropertiesActorTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptOriginPropertiesObjectTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptOriginPropertiesOriginTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptOthersPropertiesActorTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptOthersPropertiesObjectTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptOthersPropertiesOriginTermEnum
[src]
impl From<BaseBox> for ActorAndObjectOptOthersPropertiesTargetTermEnum
[src]
impl From<BaseBox> for ActorOptOriginAndTargetPropertiesActorTermEnum
[src]
impl From<BaseBox> for ActorAndOriginPropertiesActorTermEnum
[src]
fn from(item: BaseBox) -> ActorAndOriginPropertiesActorTermEnum
[src]
impl From<BaseBox> for ActorAndOriginPropertiesOriginTermEnum
[src]
fn from(item: BaseBox) -> ActorAndOriginPropertiesOriginTermEnum
[src]
impl From<BaseBox> for QuestionPropertiesOneOfTermEnum
[src]
fn from(item: BaseBox) -> QuestionPropertiesOneOfTermEnum
[src]
impl From<BaseBox> for QuestionPropertiesAnyOfTermEnum
[src]
fn from(item: BaseBox) -> QuestionPropertiesAnyOfTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesAttachmentTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesAttachmentTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesAttributedToTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesAttributedToTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesAudienceTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesAudienceTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesContextTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesContextTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesGeneratorTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesGeneratorTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesInReplyToTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesInReplyToTermEnum
[src]
impl From<BaseBox> for ActorOptOriginAndTargetPropertiesOriginTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesLocationTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesLocationTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesPreviewTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesPreviewTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesRepliesTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesRepliesTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesTagTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesTagTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesToTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesToTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesBtoTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesBtoTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesCcTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesCcTermEnum
[src]
impl From<BaseBox> for ObjectPropertiesBccTermEnum
[src]
fn from(item: BaseBox) -> ObjectPropertiesBccTermEnum
[src]
impl From<BaseBox> for RelationshipPropertiesSubjectEnum
[src]
fn from(item: BaseBox) -> RelationshipPropertiesSubjectEnum
[src]
impl From<BaseBox> for RelationshipPropertiesObjectTermEnum
[src]
fn from(item: BaseBox) -> RelationshipPropertiesObjectTermEnum
[src]
impl From<BaseBox> for ActorOptOriginAndTargetPropertiesTargetTermEnum
[src]
impl From<BaseBox> for ActorAndObjectPropertiesActorTermEnum
[src]
fn from(item: BaseBox) -> ActorAndObjectPropertiesActorTermEnum
[src]
impl From<BaseBox> for ActorAndObjectPropertiesObjectTermEnum
[src]
fn from(item: BaseBox) -> ActorAndObjectPropertiesObjectTermEnum
[src]
impl From<BaseBox> for ActorObjectAndTargetPropertiesActorTermEnum
[src]
fn from(item: BaseBox) -> ActorObjectAndTargetPropertiesActorTermEnum
[src]
impl From<BaseBox> for ActorObjectAndTargetPropertiesObjectTermEnum
[src]
fn from(item: BaseBox) -> ActorObjectAndTargetPropertiesObjectTermEnum
[src]
impl From<BaseBox> for ActorObjectAndTargetPropertiesTargetTermEnum
[src]
fn from(item: BaseBox) -> ActorObjectAndTargetPropertiesTargetTermEnum
[src]
impl Serialize for BaseBox
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl TryFrom<AMove> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: AMove) -> Result<Self, Self::Error>
[src]
impl TryFrom<Accept> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Accept) -> Result<Self, Self::Error>
[src]
impl TryFrom<Add> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Add) -> Result<Self, Self::Error>
[src]
impl TryFrom<Announce> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Announce) -> Result<Self, Self::Error>
[src]
impl TryFrom<Application> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Application) -> Result<Self, Self::Error>
[src]
impl TryFrom<Arrive> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Arrive) -> Result<Self, Self::Error>
[src]
impl TryFrom<Article> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Article) -> Result<Self, Self::Error>
[src]
impl TryFrom<Audio> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Audio) -> Result<Self, Self::Error>
[src]
impl TryFrom<Block> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Block) -> Result<Self, Self::Error>
[src]
impl TryFrom<Create> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Create) -> Result<Self, Self::Error>
[src]
impl TryFrom<Delete> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Delete) -> Result<Self, Self::Error>
[src]
impl TryFrom<Dislike> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Dislike) -> Result<Self, Self::Error>
[src]
impl TryFrom<Document> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Document) -> Result<Self, Self::Error>
[src]
impl TryFrom<Event> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Event) -> Result<Self, Self::Error>
[src]
impl TryFrom<Flag> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Flag) -> Result<Self, Self::Error>
[src]
impl TryFrom<Follow> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Follow) -> Result<Self, Self::Error>
[src]
impl TryFrom<Group> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Group) -> Result<Self, Self::Error>
[src]
impl TryFrom<Ignore> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Ignore) -> Result<Self, Self::Error>
[src]
impl TryFrom<Image> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Image) -> Result<Self, Self::Error>
[src]
impl TryFrom<Invite> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Invite) -> Result<Self, Self::Error>
[src]
impl TryFrom<Join> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Join) -> Result<Self, Self::Error>
[src]
impl TryFrom<Leave> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Leave) -> Result<Self, Self::Error>
[src]
impl TryFrom<Like> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Like) -> Result<Self, Self::Error>
[src]
impl TryFrom<Listen> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Listen) -> Result<Self, Self::Error>
[src]
impl TryFrom<Mention> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Mention) -> Result<Self, Self::Error>
[src]
impl TryFrom<Note> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Note) -> Result<Self, Self::Error>
[src]
impl TryFrom<Offer> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Offer) -> Result<Self, Self::Error>
[src]
impl TryFrom<OrderedCollection> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: OrderedCollection) -> Result<Self, Self::Error>
[src]
impl TryFrom<OrderedCollectionPage> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: OrderedCollectionPage) -> Result<Self, Self::Error>
[src]
impl TryFrom<Organization> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Organization) -> Result<Self, Self::Error>
[src]
impl TryFrom<Page> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Page) -> Result<Self, Self::Error>
[src]
impl TryFrom<Person> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Person) -> Result<Self, Self::Error>
[src]
impl TryFrom<Place> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Place) -> Result<Self, Self::Error>
[src]
impl TryFrom<Profile> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Profile) -> Result<Self, Self::Error>
[src]
impl TryFrom<Question> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Question) -> Result<Self, Self::Error>
[src]
impl TryFrom<Read> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Read) -> Result<Self, Self::Error>
[src]
impl TryFrom<Reject> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Reject) -> Result<Self, Self::Error>
[src]
impl TryFrom<Relationship> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Relationship) -> Result<Self, Self::Error>
[src]
impl TryFrom<Remove> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Remove) -> Result<Self, Self::Error>
[src]
impl TryFrom<Service> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Service) -> Result<Self, Self::Error>
[src]
impl TryFrom<TentativeAccept> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: TentativeAccept) -> Result<Self, Self::Error>
[src]
impl TryFrom<TentativeReject> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: TentativeReject) -> Result<Self, Self::Error>
[src]
impl TryFrom<Tombstone> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Tombstone) -> Result<Self, Self::Error>
[src]
impl TryFrom<Travel> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Travel) -> Result<Self, Self::Error>
[src]
impl TryFrom<Undo> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Undo) -> Result<Self, Self::Error>
[src]
impl TryFrom<UnorderedCollection> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: UnorderedCollection) -> Result<Self, Self::Error>
[src]
impl TryFrom<UnorderedCollectionPage> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: UnorderedCollectionPage) -> Result<Self, Self::Error>
[src]
impl TryFrom<Update> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Update) -> Result<Self, Self::Error>
[src]
impl TryFrom<Video> for BaseBox
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: Video) -> Result<Self, Self::Error>
[src]
impl TryFrom<View> for BaseBox
[src]
Auto Trait Implementations
impl RefUnwindSafe for BaseBox
impl Send for BaseBox
impl Sync for BaseBox
impl Unpin for BaseBox
impl UnwindSafe for BaseBox
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,