Struct catalyst::ContentClient
source · [−]pub struct ContentClient {}
Expand description
Implements all the request to interact with Catalyst Content Servers.
Implementations
sourceimpl ContentClient
impl ContentClient
sourcepub async fn active_entities(
server: &Server,
content_id: &ContentId
) -> Result<Vec<EntityId>>
pub async fn active_entities(
server: &Server,
content_id: &ContentId
) -> Result<Vec<EntityId>>
Returns a list of entity ids related to the given ContentId hash. See on Catalyst API Docs
sourcepub async fn content_files_exists(
server: &Server,
content: &Vec<ContentId>
) -> Result<Vec<ContentFileStatus>>
pub async fn content_files_exists(
server: &Server,
content: &Vec<ContentId>
) -> Result<Vec<ContentFileStatus>>
Returns the availability state for all the given ContentIds. See on Catalyst API Docs
sourcepub async fn download<V>(
server: &Server,
content_id: ContentId,
filename: V
) -> Result<()> where
V: AsRef<Path>,
pub async fn download<V>(
server: &Server,
content_id: ContentId,
filename: V
) -> Result<()> where
V: AsRef<Path>,
Download the file referenced by content_id
in the path given by filename
.
See on Catalyst API Docs
sourcepub async fn entity_information(
server: &Server,
entity: &Entity
) -> Result<EntityInformation>
pub async fn entity_information(
server: &Server,
entity: &Entity
) -> Result<EntityInformation>
Get information about the given entity
.
See on Catalyst API Docs
sourcepub async fn scene_files_for_parcels(
server: &Server,
parcels: &Vec<Parcel>
) -> Result<Vec<SceneFile>>
pub async fn scene_files_for_parcels(
server: &Server,
parcels: &Vec<Parcel>
) -> Result<Vec<SceneFile>>
Returns the scene content files for all the scenes that own the given parcels
.
See on Catalyst API Docs
sourcepub async fn snapshot_entities<T>(
server: &Server,
entity_type: EntityType,
snapshot: &Snapshot
) -> Result<Vec<EntitySnapshot<T>>> where
T: for<'a> Deserialize<'a>,
pub async fn snapshot_entities<T>(
server: &Server,
entity_type: EntityType,
snapshot: &Snapshot
) -> Result<Vec<EntitySnapshot<T>>> where
T: for<'a> Deserialize<'a>,
Returns a list of entities (in the form of EntitySnapshot
) for the given entity_type
and snapshot
.
sourcepub async fn snapshot(server: &Server) -> Result<Snapshot>
pub async fn snapshot(server: &Server) -> Result<Snapshot>
Returns a snapshot that includes the content ids for the entities available in the snapshot. See on Catalyst API Docs
sourcepub async fn status(server: &Server) -> Result<ContentServerStatus>
pub async fn status(server: &Server) -> Result<ContentServerStatus>
Returns information about the status of the server. See on Catalyst API Docs
Trait Implementations
sourceimpl Default for ContentClient
impl Default for ContentClient
sourcefn default() -> ContentClient
fn default() -> ContentClient
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ContentClient
impl Send for ContentClient
impl Sync for ContentClient
impl Unpin for ContentClient
impl UnwindSafe for ContentClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more