Skip to main content

MetadataType

Struct MetadataType 

Source
pub struct MetadataType(/* private fields */);
Expand description

Identifier for a metadata type — the xml_name value that goes in <types><name> and as the SOAP type parameter.

Use the associated constants (Self::APEX_CLASS, etc.) for common types, or Self::new for any Salesforce-defined type that isn’t covered by a constant. The constants are const-constructible, so they cost nothing at runtime — they’re just typed wrappers around &'static str values.

use cirrus_metadata::MetadataType;

// Use a constant for a common type:
let t = MetadataType::APEX_CLASS;
assert_eq!(t.as_str(), "ApexClass");

// Or pass an arbitrary type name:
let t = MetadataType::new("MyCustomFeatureType");
assert_eq!(t.as_str(), "MyCustomFeatureType");

Implementations§

Source§

impl MetadataType

Source

pub fn new(name: impl Into<Cow<'static, str>>) -> Self

Construct from any &'static str or String.

Source

pub fn as_str(&self) -> &str

The bare name as it appears in package.xml.

Source§

impl MetadataType

Source

pub const APEX_CLASS: MetadataType

Source

pub const APEX_COMPONENT: MetadataType

Source

pub const APEX_PAGE: MetadataType

Source

pub const APEX_TRIGGER: MetadataType

Source

pub const APEX_TEST_SUITE: MetadataType

Source

pub const CUSTOM_OBJECT: MetadataType

Source

pub const CUSTOM_FIELD: MetadataType

Source

pub const CUSTOM_TAB: MetadataType

Source

pub const CUSTOM_APPLICATION: MetadataType

Source

pub const CUSTOM_LABELS: MetadataType

Source

pub const CUSTOM_METADATA: MetadataType

Source

pub const CUSTOM_OBJECT_TRANSLATION: MetadataType

Source

pub const TRANSLATIONS: MetadataType

Source

pub const STANDARD_VALUE_SET: MetadataType

Source

pub const GLOBAL_VALUE_SET: MetadataType

Source

pub const RECORD_TYPE: MetadataType

Source

pub const LAYOUT: MetadataType

Source

pub const LIST_VIEW: MetadataType

Source

pub const FIELD_SET: MetadataType

Source

pub const VALIDATION_RULE: MetadataType

Source

pub const QUICK_ACTION: MetadataType

Source

pub const PROFILE: MetadataType

Source

pub const PERMISSION_SET: MetadataType

Source

pub const PERMISSION_SET_GROUP: MetadataType

Source

pub const ROLE: MetadataType

Source

pub const GROUP: MetadataType

Source

pub const QUEUE: MetadataType

Source

pub const SHARING_RULES: MetadataType

Source

pub const FLOW: MetadataType

Source

pub const FLOW_DEFINITION: MetadataType

Source

pub const WORKFLOW: MetadataType

Source

pub const APPROVAL_PROCESS: MetadataType

Source

pub const REPORT: MetadataType

Source

pub const REPORT_TYPE: MetadataType

Source

pub const DASHBOARD: MetadataType

Source

pub const DOCUMENT: MetadataType

Source

pub const EMAIL_TEMPLATE: MetadataType

Source

pub const LIGHTNING_COMPONENT_BUNDLE: MetadataType

Source

pub const AURA_DEFINITION_BUNDLE: MetadataType

Source

pub const STATIC_RESOURCE: MetadataType

Source

pub const CONTENT_ASSET: MetadataType

Source

pub const CONNECTED_APP: MetadataType

Source

pub const NAMED_CREDENTIAL: MetadataType

Source

pub const AUTH_PROVIDER: MetadataType

Source

pub const REMOTE_SITE_SETTING: MetadataType

Trait Implementations§

Source§

impl AsRef<str> for MetadataType

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for MetadataType

Source§

fn clone(&self) -> MetadataType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for MetadataType

Source§

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

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

impl Display for MetadataType

Source§

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

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

impl From<&'static str> for MetadataType

Source§

fn from(s: &'static str) -> Self

Converts to this type from the input type.
Source§

impl From<String> for MetadataType

Source§

fn from(s: String) -> Self

Converts to this type from the input type.
Source§

impl Hash for MetadataType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for MetadataType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Eq for MetadataType

Source§

impl StructuralPartialEq for MetadataType

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more