nominal-api-conjure 0.1445.0

Conjure HTTP API bindings for the Nominal platform
Documentation
/// An endpoint of a canvas connection, identifying an attachment point
/// (anchor) on a canvas object.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct CanvasEndpoint {
    #[serde(rename = "objectId")]
    object_id: conjure_object::Uuid,
    #[builder(into)]
    #[serde(rename = "anchorId")]
    anchor_id: String,
}
impl CanvasEndpoint {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(object_id: conjure_object::Uuid, anchor_id: impl Into<String>) -> Self {
        Self::builder().object_id(object_id).anchor_id(anchor_id).build()
    }
    /// The canvas object containing the referenced anchor.
    #[inline]
    pub fn object_id(&self) -> conjure_object::Uuid {
        self.object_id
    }
    /// Identifier of the attachment point on the canvas object. Kept as a
    /// string so clients can add custom anchors later without an API change.
    /// The initial well-known values are left, top, bottom, and right.
    #[inline]
    pub fn anchor_id(&self) -> &str {
        &*self.anchor_id
    }
}