NewShare

Struct NewShare 

Source
pub struct NewShare {
Show 13 fields pub share_with: OcmAddress, pub name: String, pub description: Option<String>, pub provider_id: String, pub owner: OcmAddress, pub sender: OcmAddress, pub owner_display_name: Option<String>, pub sender_display_name: Option<String>, pub share_type: ShareType, pub resource_type: String, pub expiration: Option<i64>, pub code: Option<String>, pub protocol: Protocol,
}

Fields§

§share_with: OcmAddress

Consumer specific identifier of the user, group or federation the provider wants to share the resource with. This is known in advance. Please note that the consumer service endpoint is known in advance as well, so this is no part of the request body. example: 51dc30ddc473d43a6011e9ebba6ca770@geant.org

§name: String

Name of the resource (file or folder). example: resource.txt

§description: Option<String>

Optional description of the resource (file or folder).

§provider_id: String

Identifier to identify the shared resource at the provider side. This is unique per provider such that if the same resource is shared twice, this providerId will not be repeated.

example: 7c084226-d9a1-11e6-bf26-cec0c932ce01

§owner: OcmAddress

Provider specific identifier of the user who owns the resource.

example: 6358b71804dfa8ab069cf05ed1b0ed2a@apiwise.nl

§sender: OcmAddress

Provider specific identifier of the user that wants to share the resource. Please note that the requesting provider is being identified on a higher level, so the former remote property is not part of the request body.

example: 527bd5b5d689e2c32ae974c6229ff785@apiwise.nl

§owner_display_name: Option<String>

Display name of the owner of the resource example: Dimitri

§sender_display_name: Option<String>

Display name of the user that wants to share the resource example: John Doe

§share_type: ShareType

Recipient share type

§resource_type: String

Resource type (file, calendar, contact, …) example: file

§expiration: Option<i64>

The expiration time for the share, in seconds of UTC time since Unix epoch. If omitted, it is assumed that the share does not expire.

§code: Option<String>

A nonce to be exchanged for a (potentially short-lived) bearer token at the Sending Server’s /token endpoint.

§protocol: Protocol

Implementations§

Source§

impl NewShare

Source

pub fn sending_server(&self) -> SendingServer

Get the Sending Server from the sender of the share.

Trait Implementations§

Source§

impl Clone for NewShare

Source§

fn clone(&self) -> NewShare

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NewShare

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NewShare

Source§

fn default() -> NewShare

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for NewShare

Source§

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 PartialEq for NewShare

Source§

fn eq(&self, other: &NewShare) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for NewShare

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for NewShare

Source§

impl StructuralPartialEq for NewShare

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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