Enum bc_envelope::extension::expression::Parameter
source · pub enum Parameter {
Known(u64, Option<ParameterName>),
Named(ParameterName),
}Expand description
A declared parameter.
Variants§
Implementations§
source§impl Parameter
impl Parameter
sourcepub fn new_known(value: u64, name: Option<String>) -> Self
pub fn new_known(value: u64, name: Option<String>) -> Self
Creates a new parameter with a value and an optional name.
sourcepub fn new_named(name: &str) -> Self
pub fn new_named(name: &str) -> Self
Creates a new parameter with a name. This call cannot be used to declare a parameter at compile-time.
sourcepub const fn new_with_static_name(value: u64, name: &'static str) -> Self
pub const fn new_with_static_name(value: u64, name: &'static str) -> Self
Creates a new parameter with a value and a static name. This call can be used to declare a parameter at compile-time.
sourcepub const fn new_static_named(name: &'static str) -> Self
pub const fn new_static_named(name: &'static str) -> Self
Creates a new parameter with a static name. This call can be used to declare a parameter at compile-time.
Trait Implementations§
source§impl CBORDecodable for Parameter
impl CBORDecodable for Parameter
source§impl CBOREncodable for Parameter
impl CBOREncodable for Parameter
source§impl CBORTagged for Parameter
impl CBORTagged for Parameter
source§impl CBORTaggedDecodable for Parameter
impl CBORTaggedDecodable for Parameter
source§fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self>
fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self>
Creates an instance of this type by decoding it from untagged CBOR.
source§fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where
Self: Sized,
fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where
Self: Sized,
Creates an instance of this type by decoding it from tagged CBOR.
source§impl CBORTaggedEncodable for Parameter
impl CBORTaggedEncodable for Parameter
source§fn untagged_cbor(&self) -> CBOR
fn untagged_cbor(&self) -> CBOR
Returns the untagged CBOR encoding of this instance.
source§fn tagged_cbor(&self) -> CBOR
fn tagged_cbor(&self) -> CBOR
Returns the tagged CBOR encoding of this instance.
source§impl PartialEq for Parameter
impl PartialEq for Parameter
impl Eq for Parameter
Auto Trait Implementations§
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnwindSafe for Parameter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more